Skip to content

Commit 383f321

Browse files
authored
Merge pull request #86 from DHTMLX/9.3
[add] docs' updates for v9.3
2 parents 6c85014 + ebf8d50 commit 383f321

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1289
-262
lines changed
32.2 KB
Loading
31.9 KB
Loading
31.2 KB
Loading
26.7 KB
Loading
31 KB
Loading
27.3 KB
Loading
16.3 KB
Loading

docs/chart/api/export/chart_pdf_method.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ description: You can explore the pdf method of Chart in the documentation of the
88

99
@short: Exports a chart to a PDF file
1010

11-
@signature: {'pdf(config?: object): void;'}
11+
@signature: {'pdf(config?: IPDFConfig): Promise<void>;'}
12+
13+
@returns:
14+
A promise of data export
1215

1316
@params:
1417
- `config` - (optional) an object with export settings. You can specify the following settings for export to PDF:
15-
- `url?: string` - (optional) the url of the service that executes export and returns an exported file. This setting is optional, you should use it only if you need to specify the path to your local export service. The default value is `https://export.dhtmlx.com/chart/pdf/8.0.0`
18+
- `url?: string` - (optional) the url of the service that executes export and returns an exported file. This setting is optional, you should use it only if you need to specify the path to your local export service. The default value is `https://export.dhtmlx.com/chart/pdf/9.3.0`
1619
- `name?: string` - (optional) the name of the exported file
1720
- `theme?: string` - (optional) the exported theme, "light" by default. For custom or overridden themes, enable the `exportStyles` option
1821
- `exportStyles?: boolean | string[]` - (optional) defines the styles that will be sent to the export service when exporting Chart. Use *false* to prevent all styles from being sent to the export service
@@ -45,13 +48,19 @@ description: You can explore the pdf method of Chart in the documentation of the
4548

4649
@example:
4750
// default export
48-
chart.export.pdf();
51+
chart.export.pdf()
52+
.then(() => console.log("success"))
53+
.catch(() => console.log("failure"))
54+
.finally(() => console.log("finished"));
4955

5056
// export with config settings
5157
chart.export.pdf({
52-
url: "https://export.dhtmlx.com/chart/pdf/8.0.0",
53-
name:"result.pdf"
54-
});
58+
url: "https://export.dhtmlx.com/chart/pdf/9.3.0",
59+
name: "result.pdf"
60+
})
61+
.then(() => console.log("success"))
62+
.catch(() => console.log("failure"))
63+
.finally(() => console.log("finished"));
5564

5665
@descr:
5766

@@ -75,11 +84,13 @@ It is necessary to set sufficient margin for correct display of `headerTemplate`
7584
| "A5" | (5.83in x 8.27in) |
7685
| "A6" | (4.13in x 5.83in) |
7786

78-
**Related samples**: [Chart. Export. Export to PDF/PNG](https://snippet.dhtmlx.com/4rybsjjq)
87+
**Related samples**: [Chart. Export to PDF/PNG](https://snippet.dhtmlx.com/4rybsjjq)
7988

80-
**Related API:** [exportStyles](chart/api/chart_exportstyles_config.md)
89+
**Related API:** [`exportStyles`](chart/api/chart_exportstyles_config.md)
8190

8291
**Change log:**
92+
93+
- The method returns a promise of data export since v9.3
8394
- The **header** and **footer** options of the export object were added in v8.4
8495
- The **theme**, **exportStyles** options of the export object were added in v8.1
8596
- The **pageRanges**, **displayHeaderFooter**, **footerTemplate**, **headerTemplate** options of the pdf object were added in v8.1

docs/chart/api/export/chart_png_method.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ description: You can explore the png method of Chart in the documentation of the
88

99
@short: Exports a chart to a PNG file
1010

11-
@signature: {'png(config?: object): void;'}
11+
@signature: {'png(config?: IPNGConfig): Promise<void>;'}
12+
13+
@returns:
14+
A promise of data export
1215

1316
@params:
1417
- `config` - (optional) an object with export settings. You can specify the following settings for export to PNG:
15-
- `url?: string` - (optional) the url of the service that executes export and returns an exported file. This setting is optional, you should use it only if you need to specify the path to your local export service. The default value is `https://export.dhtmlx.com/chart/png/8.0.0`
18+
- `url?: string` - (optional) the url of the service that executes export and returns an exported file. This setting is optional, you should use it only if you need to specify the path to your local export service. The default value is `https://export.dhtmlx.com/chart/png/9.3.0`
1619
- `name?: string` - (optional) the name of the exported file
1720
- `theme?: string` - (optional) the exported theme, "light" by default. For custom or overridden themes, enable the `exportStyles` option
1821
- `exportStyles?: boolean | string[]` - (optional) defines the styles that will be sent to the export service when exporting Chart. Use *false* to prevent all styles from being sent to the export service
@@ -21,22 +24,29 @@ description: You can explore the png method of Chart in the documentation of the
2124

2225
@example:
2326
// default export
24-
chart.export.png();
27+
chart.export.png()
28+
.then(() => console.log("success"))
29+
.catch(() => console.log("failure"))
30+
.finally(() => console.log("finished"));
2531

2632
// export with config settings
2733
chart.export.png({
28-
url: "https://export.dhtmlx.com/chart/png/8.0.0",
34+
url: "https://export.dhtmlx.com/chart/png/9.3.0",
2935
name: "result.png"
30-
});
36+
})
37+
.then(() => console.log("success"))
38+
.catch(() => console.log("failure"))
39+
.finally(() => console.log("finished"));
3140

3241
@descr:
3342

34-
**Related samples**: [Chart. Export. Export to PDF/PNG](https://snippet.dhtmlx.com/4rybsjjq)
43+
**Related samples**: [Chart. Export to PDF/PNG](https://snippet.dhtmlx.com/4rybsjjq)
3544

36-
**Related API:** [exportStyles](chart/api/chart_exportstyles_config.md)
45+
**Related API:** [`exportStyles`](chart/api/chart_exportstyles_config.md)
3746

3847
**Change log:**
3948

49+
- The method returns a promise of data export since v9.3
4050
- The **header** and **footer** options of the export object were added in 8.4
4151
- The **theme** and **exportStyles** options of the export object were added in 8.1
4252
- Added in v8.0

docs/chart/features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ In this section you will know how to export Chart to different formats.
121121

122122
| Topic | Description |
123123
| :----------------------------------------------------------------- | :----------------------------------------------------------------------------------------------- |
124-
| [Exporting Chart to a PDF or PNG file](category/export-methods.md) | Learn how to export Chart to PDF or PNG formats ([Example](https://snippet.dhtmlx.com/4rybsjjq)) |
124+
| [Exporting Chart to a PDF or PNG file](../usage/#exporting-data) | Learn how to export Chart to PDF or PNG formats ([Example](https://snippet.dhtmlx.com/4rybsjjq)) |
125125

126126
## How to work with Chart events
127127

@@ -150,7 +150,7 @@ In this section you will learn about common functionality of the library which c
150150
| ------------------------------------------------------------- | ------------------------------------------------------------- |
151151
| [Touch support](../../common_features/touch_support/) | Learn how to work with touch support |
152152
| [TypeScript support](../../common_features/using_typescript/) | Learn how to work with TypeScript |
153-
| [AwaitRedraw](../../helpers/await_redraw/) | Learn how to perform the code after the components rendering |
153+
| [AwaitRedraw](../../helpers/await_redraw/) | Learn how to perform the code after the component's rendering |
154154

155155
## Any questions left?
156156

0 commit comments

Comments
 (0)