push the uni-demo project
This commit is contained in:
+69
@@ -0,0 +1,69 @@
|
||||
# Contributing
|
||||
|
||||
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
|
||||
|
||||
Please check out the [Apache Code of Conduct](https://www.apache.org/foundation/policies/conduct.html) first.
|
||||
|
||||
## What can you do for the ECharts community?
|
||||
|
||||
Contributions can be made in varied ways:
|
||||
|
||||
- Help others in the issues
|
||||
- Help solve problems with the issues
|
||||
- Remind the authors to provide a demo if they are reporting for a bug
|
||||
- Try to reproduce the problem as described in the issues
|
||||
- Make pull requests to fix bugs or implement new features
|
||||
- Improve or translate the documents
|
||||
- Discuss in the [mailing list](https://echarts.apache.org/en/maillist.html)
|
||||
- ...
|
||||
|
||||
## Issues
|
||||
|
||||
We have already prepared issue templates for bug report and feature request. If you want to fire an issue, just entering [New issue](https://github.com/apache/echarts/issues/new/choose) page and select either of them to get started.
|
||||
|
||||
Additionally, before doing so, please search for similar questions in our [issues list](https://github.com/apache/echarts/issues?utf8=%E2%9C%93&q=is%3Aissue). If you are able to reproduce an issue found in a closed issue, please create a new issue and reference the closed one.
|
||||
|
||||
Please read the [documentation](http://echarts.apache.org/option.html) carefully before asking any questions.
|
||||
|
||||
Any questions in the form of *how can I use echarts to* or *how to use echarts x feature to* belong in [Stack Overflow](http://stackoverflow.com), issues with questions like that in the issue tracker will be closed.
|
||||
|
||||
## Release Milestone Discussion
|
||||
|
||||
We will start the discussion about the bugs to fix and the features of each release in the [mailing list](https://echarts.apache.org/en/maillist.html). You may subscribe to our [mailing list](https://echarts.apache.org/en/maillist.html) to give your valuable advice in milestone discussions.
|
||||
|
||||
Regarding the release plan, we will release a minor version at the end of every month. Here is some detail.
|
||||
|
||||
1. Assume our current stable release is 4.3.0. We will start the discussion of the milestone of the release two versions ahead, which is 4.5.0 at the beginning of each month. At this time we should also kickoff the development of the next release, which is 4.4.0.
|
||||
2. Finish 4.4.0 developing at about 22th of this month and start the testing. And the 4.5.0 milestone discussion is frozen and published on the [GitHub](https://github.com/apache/echarts/milestone/14)
|
||||
3. Vote in the mailing list for the 4.4.0 release at the end of this month.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Wiki: [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request)
|
||||
|
||||
## How to Debug ECharts
|
||||
|
||||
Wiki: [How to setup the dev environment](https://github.com/apache/echarts/wiki/How-to-setup-the-dev-environment)
|
||||
|
||||
## Some hints about using code from other authors
|
||||
|
||||
+ About using some algorithms/formulas or inspired by other's work:
|
||||
+ We can be inspired by other people’s work. There is no problem with copying ideas and no problems associated with that so long as the code is entirely yours and you aren’t violating the license of the inspirational work. You can just follow "normal" source code rules.
|
||||
+ But when you copy the code, even parts of files, it must remain under the copyright of the original authors.
|
||||
+ What's the right thing to do for the public good here? I'll go with:
|
||||
+ Be transparent when implementing an existing idea/algorithm.
|
||||
+ Reference where that idea/algorithm came from.
|
||||
+ Use standard language when doing so (we need to define standard language).
|
||||
+ "inspired by", "learned from" and "references to" are vague concepts in copyright.
|
||||
+ If any copyrightable expression is copied from the existing idea/algorithm, compare its licensing to our licensing policies and include licensing accordingly.
|
||||
+ Check the original discussion about it in: https://lists.apache.org/list.html?legal-discuss@apache.org:lte=36M:echarts
|
||||
+ About adding the license/header of 3rd-party work:
|
||||
+ https://www.apache.org/legal/src-headers.html#3party
|
||||
+ Licenses that are compatible with the Apache license:
|
||||
+ BSD and MIT are compatible with the Apache license but CC_BY_SA is not (https://apache.org/legal/resolved.html#cc-sa).
|
||||
+ Stack Overflow:
|
||||
+ before intending to copy code from Stack Overflow, we must check:
|
||||
+ https://apache.org/legal/resolved.html#stackoverflow
|
||||
+ https://issues.apache.org/jira/browse/LEGAL-471
|
||||
+ Wikipedia (and most Wikimedia Foundation projects):
|
||||
+ Wikipedia, and most Wikimedia Foundation projects, are licensed under CC 4.0 BY_SA (and sometimes GFDL) and is incompatible with the Apache license. Therefore, we should not copy code from Wikipedia, or Wikimedia Foundation projects.
|
||||
+312
@@ -0,0 +1,312 @@
|
||||
This file contains the PGP keys of various developers.
|
||||
Please don't use them for email unless you have to. Their main
|
||||
purpose is code signing.
|
||||
|
||||
Examples of importing this file in your keystore:
|
||||
gpg --import KEYS.txt
|
||||
(need pgp and other examples here)
|
||||
|
||||
Examples of adding your key to this file:
|
||||
pgp -kxa <your name> and append it to this file.
|
||||
(pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
|
||||
(gpg --list-sigs <your name>
|
||||
&& gpg --armor --export <your name>) >> this file.
|
||||
|
||||
---------------------------------------
|
||||
pub rsa4096 2018-04-23 [SC]
|
||||
9B06D9B4FA37C4DD52725742747985D7E3CEB635
|
||||
uid [ultimate] Su Shuang (CODE SIGNING KEY) <sushuang@apache.org>
|
||||
sig 3 747985D7E3CEB635 2018-04-23 Su Shuang (CODE SIGNING KEY) <sushuang@apache.org>
|
||||
sub rsa4096 2018-04-23 [E]
|
||||
sig 747985D7E3CEB635 2018-04-23 Su Shuang (CODE SIGNING KEY) <sushuang@apache.org>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
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
|
||||
oQH7TsthVKvdZyjtZQg=
|
||||
=Uv8d
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
pub rsa4096 2019-01-24 [SC]
|
||||
1683FBD23F6DD36C0E52223507D78F777D2C0C27
|
||||
uid [ultimate] Ovilia (CODE SIGNING KEY) <oviliazhang@gmail.com>
|
||||
sig 3 07D78F777D2C0C27 2019-01-24 Ovilia (CODE SIGNING KEY) <oviliazhang@gmail.com>
|
||||
sub rsa4096 2019-01-24 [E]
|
||||
sig 07D78F777D2C0C27 2019-01-24 Ovilia (CODE SIGNING KEY) <oviliazhang@gmail.com>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
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
|
||||
B4WM8AJSCwl8WlZrRA==
|
||||
=wft0
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
pub rsa4096 2020-08-06 [SC]
|
||||
94BD178077672157652826758E44A82497382298
|
||||
uid [ 绝对 ] Shen Yi (CODE SIGNING KEY\) <shenyi@apache.org>
|
||||
sig 3 8E44A82497382298 2020-08-06 Shen Yi (CODE SIGNING KEY\) <shenyi@apache.org>
|
||||
sub rsa4096 2020-08-06 [E]
|
||||
sig 8E44A82497382298 2020-08-06 Shen Yi (CODE SIGNING KEY\) <shenyi@apache.org>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBF8sDHUBEADScBNW9N9I7tu/ytMLp0XSQbyDO64iRsaAic/dnM4ffcZOl1AZ
|
||||
fbKTF2jI5ABVIl6mWBx5t8RE5XluyESfnB0au3fa0N1cb9bzjAqPiiTU5l9vF4Np
|
||||
u0517j8anqPYYk9n0HCVczaBQLavwa7ulUegnMCvO+WkrapkES3PzF/QDmHEh4iC
|
||||
FnPsayrhYvirg7Gwy6gkfkSZvp2jQIt2O3PQmffW1OsxwCf0uNIf4UrXxZ9gi6hc
|
||||
O/x1jNNpyfOBJY5es8feIsx+zQu/jZRL5AnLeuqYdODD/IdcT/AsSeFnMkIuYdKl
|
||||
+S5DL23Rr5W47mCkRglauIOAFXnVd6cc3I0/TB+8+B1XOE7YBcslPytVmnc00Uwf
|
||||
f09a1WF7gTufCQAizIRShHLqSXA8Gebs42g5CLEC7k4v1Yojmwun5UFDlbxERQgj
|
||||
00hyDsGYv9Mwk5EokcpB/fyInRU0Niny6kk/siui/nvol0vcqBgwTqRJjfFByX8T
|
||||
ck11j7f3mUFq4z/PsVU4pQQpGyuiKLDQm7IJPAsJC/+s7aHAuMS/j3lpitM8j26A
|
||||
3x091RsxjfBrCusxb301rzw6F2g4bxTRueoPv9Ie8OW27uykqTgdnnCSjT5LQcN7
|
||||
H3dRmfk4UMU+QJTDhIdCzHyMnSGBVmlbbHIMIaoxnqzXFpO1+iGRQs8QcwARAQAB
|
||||
tC9TaGVuIFlpIChDT0RFIFNJR05JTkcgS0VZXCkgPHNoZW55aUBhcGFjaGUub3Jn
|
||||
PokCTgQTAQgAOBYhBJS9F4B3ZyFXZSgmdY5EqCSXOCKYBQJfLAx1AhsDBQsJCAcC
|
||||
BhUKCQgLAgQWAgMBAh4BAheAAAoJEI5EqCSXOCKYVkYP/1n0eL9d5EnDunqxo0dt
|
||||
HlfxLSx4l+edORXF+q9p0s7x33AktUZxMMNEbeAAgfrtC8sXg8bMa/NWHvmWVND7
|
||||
Qj8nJYVZ/jJSVwwXImsK6EdP8401UM1X3+z7uWy4KepJZQIVd6j8dxhW4QE74mlx
|
||||
CLBm9dK5rgxTjcNIKApscBJ6pP2eZBprHNdDW3ttaIMGBfz+nA3IpvH7ADgEkffP
|
||||
zc9BjiyCuff3q4qW1PnATJFEQCbBAxU13Y8S7pDRhHHDvuo/GNMAoKm8xWb9OzTz
|
||||
u8KistljvZWD1ZBjYxAYIKDqVyyUeH/aN134QsQyra++FFHkTiyYjpn/roSQm3Ww
|
||||
eQLXtRK0f12EpDb2pchxSrN3L4wRtzGj3I/u/7z6YXa8nuK29t8CDGTss4kBjDmQ
|
||||
2uYNAxFq6EylZU6QzaqvQgv/nhSuJFGlSY3v/4Q1MxB5rn68s2jegi/HXUIbFerf
|
||||
KgeJCN8nUtBiSIzVwMo0HMrrNyR4ZdCJa4bxzHspu6Fck4572AKxB3TNFkLYC0s+
|
||||
zOQ6b6l0bMgzH4HDj6C0k0+KtikK6Q2U1YXWu1T4MBu8Gq4weGEUDOxc0B1XywA2
|
||||
BE+cbOpjHi4lK3n1//RjUR+JL90RuD+JGCB8x2d+Ttm/c19S/KjQc8CsJ9JA5x1H
|
||||
wlHqg7br0XQQrbUedY65S6skuQINBF8sDHUBEAC99I/csLsLcrpNXB2JYh8XmtBc
|
||||
Vb6aSWCc7kowhdwuqjyXvHMkpy9RZz6hxEkk8XiZC+nrCcrr7DNNFNzh5gx30Ihm
|
||||
NyZybaawr/vn5O2Oe0BSTwuhIdk1XjpzDtqpcNT2Qui4eRx/OBcyyX9PJvicBfMq
|
||||
53ZNom/3NTZbsXp70uCV8eC97a7g7T+GymRS1u2x7I/Kp+/w0plG11bXnWg2A0EZ
|
||||
WHCnmQWBUpqSUW3syfuzqlCFDYWoyVkw2eNtIbhGv9knEKPtU9bewAbo1/2Jk1R2
|
||||
FVP5B3VvdY2huzQLzbzHB4zhsJCEjYnvzwPZ0WeIYHmTYJEAulTynBdv9GNX9sdM
|
||||
GNXS/ESTFUQDMXbgDBdwVxZOq1Gzwh+grN3lwpS/5wcsSuNhfEfvx37DyLKNiXMo
|
||||
5HS/g03kAmmIgH7IWUcM27ZyyKlpxj8ztFFUIdnIUX4biiZCBJnfMuWnNzJM7o/b
|
||||
T8PVEEM3wuUT5ih7yT4l/j5pV4WmEbgVdWSrbL/H77GuFHwXYiuzDyH1/E23Hedi
|
||||
crd8g47bV0jL1v0TwT4oHtEkAXIU5Nj2+z+ZKSl5SJ0I2tAy86hCpIn/rmbMmtws
|
||||
Ce/OHHOu2Mm5KBEK9SyLThMzqYrv5Zux9Xqre+P0LPk/tzxwdG87qKhU0xdPvn6y
|
||||
rGaC1OFCT3GmidZl2QARAQABiQI2BBgBCAAgFiEElL0XgHdnIVdlKCZ1jkSoJJc4
|
||||
IpgFAl8sDHUCGwwACgkQjkSoJJc4IphtBw/8DsvdVbaaVqMOe/S66R3zn5M22YKU
|
||||
AkhQvBQId4rTDUgTiSJ6Ll+Ascr1q2gFupb7iAM4BWAFQji4f8iH51sS9a6I6Oy8
|
||||
WK4ftFYDyQU0/hgaF2B0+QE0PN3/88ckBlL3KHhzw0ad/Y2Bp6CGGFNwI9xqC7XT
|
||||
t8Y+XCpv9buC7ZVpE/N/yF+2HvVhW7PG+5oB+Qc+Q/G0RK2QX7unOSqLc2pS/n4v
|
||||
mBqGc1KAe7iyxOo2Q2G+Q0XTK8g/BUMWACVOuYpOrvteyHJXIYv/VDRu+/pd81G0
|
||||
i6B063BzuaDRqwNngLOU6lNcDOgom6gWkCfkg1Nbr009rXyADIg/RHPX1TUAaoFn
|
||||
QH0YDIxWfyDvTJ7FgmLVCnXXc88T1du/ROAq5Y+opD3vcDX+egzbKR+oSGbaf6HL
|
||||
ASj0haconAOZ7V3sLO9WSITUODzHEUwOuOx+XtaW/JYTm47JeH2r83v+OmBNbAJg
|
||||
hT5KINI8iBvor3cUYKAor9ib1192ZHgBjPlrFDMntZZCqKyCvRGRktts4VcH09DD
|
||||
szVC2TEeuxgIMuUi73HebjX+fRefcSIkW30ehXVzN/7Ah1SK9IJc9hzVa2ZspUho
|
||||
Ias/zRyLSbzHrpCs6KVPLwzOQbyPmXNpjoYuGCq6NX54S7bf8Hn3X8SQmezozLhN
|
||||
krvOtK7UUytDTcY=
|
||||
=+SBy
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
pub rsa4096 2022-03-02 [SC]
|
||||
8ACA4FC874B6B0836DFE70BB52514D7E7CFC32B6
|
||||
uid [ 绝对 ] Zhang Wenli (CODE SIGNING KEY) <ovilia@apache.org>
|
||||
sig 3 52514D7E7CFC32B6 2022-03-02 Zhang Wenli (CODE SIGNING KEY) <ovilia@apache.org>
|
||||
sub rsa4096 2022-03-02 [E]
|
||||
sig 52514D7E7CFC32B6 2022-03-02 Zhang Wenli (CODE SIGNING KEY) <ovilia@apache.org>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
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
|
||||
RWnk0btbWIvaznWpIWo=
|
||||
=QBYg
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
pub rsa4096 2022-03-28 [SC]
|
||||
EFA5629C5F1FF8D33E016202F16C82C561221579
|
||||
uid [ultimate] Zhongxiang Wang (CODE SIGNING KEY) <wangzx@apache.org>
|
||||
sig 3 F16C82C561221579 2022-03-28 Zhongxiang Wang (CODE SIGNING KEY) <wangzx@apache.org>
|
||||
sub rsa4096 2022-03-28 [E]
|
||||
sig F16C82C561221579 2022-03-28 Zhongxiang Wang (CODE SIGNING KEY) <wangzx@apache.org>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
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
|
||||
5B5E6LlMNPTCWmPzYtTm5qZK
|
||||
=bbcU
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
========================================================================
|
||||
Apache ECharts Subcomponents:
|
||||
|
||||
The Apache ECharts project contains subcomponents with separate copyright
|
||||
notices and license terms. Your use of the source code for these
|
||||
subcomponents is also subject to the terms and conditions of the following
|
||||
licenses.
|
||||
|
||||
BSD 3-Clause (d3.js):
|
||||
The following files embed [d3.js](https://github.com/d3/d3) BSD 3-Clause:
|
||||
`/src/chart/treemap/treemapLayout.ts`,
|
||||
`/src/chart/tree/layoutHelper.ts`,
|
||||
`/src/chart/graph/forceHelper.ts`,
|
||||
`/src/util/number.ts`
|
||||
See `/licenses/LICENSE-d3` for details of the license.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
Apache ECharts
|
||||
Copyright 2017-2022 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (https://www.apache.org/).
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
# Apache ECharts
|
||||
|
||||
<a href="https://echarts.apache.org/">
|
||||
<img style="vertical-align: top;" src="./asset/logo.png?raw=true" alt="logo" height="50px">
|
||||
</a>
|
||||
|
||||
Apache ECharts is a free, powerful charting and visualization library offering an easy way of adding intuitive, interactive, and highly customizable charts to your commercial products. It is written in pure JavaScript and based on <a href="https://github.com/ecomfe/zrender">zrender</a>, which is a whole new lightweight canvas library.
|
||||
|
||||
**[中文官网](https://echarts.apache.org/zh/index.html)** | **[ENGLISH HOMEPAGE](https://echarts.apache.org/en/index.html)**
|
||||
|
||||
[](https://github.com/apache/echarts/blob/master/LICENSE) [](https://www.npmjs.com/package/echarts) [](https://www.npmjs.com/package/echarts) [](https://github.com/apache/echarts/graphs/contributors)
|
||||
|
||||
[](https://github.com/apache/echarts/actions/workflows/ci.yml)
|
||||
|
||||
## Get Apache ECharts
|
||||
|
||||
You may choose one of the following methods:
|
||||
|
||||
+ Download from the [official website](https://echarts.apache.org/download.html)
|
||||
+ `npm install echarts --save`
|
||||
+ CDN: [jsDelivr CDN](https://www.jsdelivr.com/package/npm/echarts?path=dist)
|
||||
|
||||
## Docs
|
||||
|
||||
+ [Get Started](https://echarts.apache.org/handbook)
|
||||
+ [API](https://echarts.apache.org/api.html)
|
||||
+ [Option Manual](https://echarts.apache.org/option.html)
|
||||
+ [Examples](https://echarts.apache.org/examples)
|
||||
|
||||
## Get Help
|
||||
|
||||
+ [GitHub Issues](https://github.com/apache/echarts/issues) for bug report and feature requests
|
||||
+ Email [dev@echarts.apache.org](mailto:dev@echarts.apache.org) for general questions
|
||||
+ Subscribe to the [mailing list](https://echarts.apache.org/maillist.html) to get updated with the project
|
||||
|
||||
## Build
|
||||
|
||||
Build echarts source code:
|
||||
|
||||
Execute the instructions in the root directory of the echarts:
|
||||
([Node.js](https://nodejs.org) is required)
|
||||
|
||||
```shell
|
||||
# Install the dependencies from NPM:
|
||||
npm install
|
||||
|
||||
# Rebuild source code immediately in watch mode when changing the source code.
|
||||
npm run dev
|
||||
|
||||
# Check correctness of TypeScript code.
|
||||
npm run checktype
|
||||
|
||||
# If intending to build and get all types of the "production" files:
|
||||
npm run release
|
||||
```
|
||||
|
||||
Then the "production" files are generated in the `dist` directory.
|
||||
|
||||
## Contribution
|
||||
|
||||
If you wish to debug locally or make pull requests, please refer to the [contributing](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md) document.
|
||||
|
||||
## Resources
|
||||
|
||||
### Awesome ECharts
|
||||
|
||||
[https://github.com/ecomfe/awesome-echarts](https://github.com/ecomfe/awesome-echarts)
|
||||
|
||||
### Extensions
|
||||
|
||||
+ [ECharts GL](https://github.com/ecomfe/echarts-gl) An extension pack of ECharts, which provides 3D plots, globe visualization, and WebGL acceleration.
|
||||
|
||||
+ [Liquidfill 水球图](https://github.com/ecomfe/echarts-liquidfill)
|
||||
|
||||
+ [Wordcloud 字符云](https://github.com/ecomfe/echarts-wordcloud)
|
||||
|
||||
+ [Extension for Baidu Map 百度地图扩展](https://github.com/apache/echarts/tree/master/extension-src/bmap) An extension provides a wrapper of Baidu Map Service SDK.
|
||||
|
||||
+ [vue-echarts](https://github.com/ecomfe/vue-echarts) ECharts component for Vue.js
|
||||
|
||||
+ [echarts-stat](https://github.com/ecomfe/echarts-stat) Statistics tool for ECharts
|
||||
|
||||
## License
|
||||
|
||||
ECharts is available under the Apache License V2.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
Please refer to [Apache Code of Conduct](https://www.apache.org/foundation/policies/conduct.html).
|
||||
|
||||
## Paper
|
||||
|
||||
Deqing Li, Honghui Mei, Yi Shen, Shuang Su, Wenli Zhang, Junting Wang, Ming Zu, Wei Chen.
|
||||
[ECharts: A Declarative Framework for Rapid Construction of Web-based Visualization](https://www.sciencedirect.com/science/article/pii/S2468502X18300068).
|
||||
Visual Informatics, 2018.
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 236 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
+183
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
const fs = require('fs');
|
||||
const preamble = require('./preamble');
|
||||
const pathTool = require('path');
|
||||
const chalk = require('chalk');
|
||||
|
||||
// In the `.headerignore`, each line is a pattern in RegExp.
|
||||
// all relative path (based on the echarts base directory) is tested.
|
||||
// The pattern should match the relative path completely.
|
||||
const excludesPath = pathTool.join(__dirname, '../.headerignore');
|
||||
const ecBasePath = pathTool.join(__dirname, '../');
|
||||
|
||||
const isVerbose = process.argv[2] === '--verbose';
|
||||
|
||||
// const lists = [
|
||||
// '../src/**/*.js',
|
||||
// '../build/*.js',
|
||||
// '../benchmark/src/*.js',
|
||||
// '../benchmark/src/gulpfile.js',
|
||||
// '../extension-src/**/*.js',
|
||||
// '../extension/**/*.js',
|
||||
// '../map/js/**/*.js',
|
||||
// '../test/build/**/*.js',
|
||||
// '../test/node/**/*.js',
|
||||
// '../test/ut/core/*.js',
|
||||
// '../test/ut/spe/*.js',
|
||||
// '../test/ut/ut.js',
|
||||
// '../test/*.js',
|
||||
// '../theme/*.js',
|
||||
// '../theme/tool/**/*.js',
|
||||
// '../echarts.all.js',
|
||||
// '../echarts.blank.js',
|
||||
// '../echarts.common.js',
|
||||
// '../echarts.simple.js',
|
||||
// '../index.js',
|
||||
// '../index.common.js',
|
||||
// '../index.simple.js'
|
||||
// ];
|
||||
|
||||
function run() {
|
||||
const updatedFiles = [];
|
||||
const passFiles = [];
|
||||
const pendingFiles = [];
|
||||
|
||||
eachFile(function (absolutePath, fileExt) {
|
||||
const fileStr = fs.readFileSync(absolutePath, 'utf-8');
|
||||
|
||||
const existLicense = preamble.extractLicense(fileStr, fileExt);
|
||||
|
||||
if (existLicense) {
|
||||
passFiles.push(absolutePath);
|
||||
return;
|
||||
}
|
||||
|
||||
// Conside binary files, only add for files with known ext.
|
||||
if (!preamble.hasPreamble(fileExt)) {
|
||||
pendingFiles.push(absolutePath);
|
||||
return;
|
||||
}
|
||||
|
||||
fs.writeFileSync(absolutePath, preamble.addPreamble(fileStr, fileExt), 'utf-8');
|
||||
updatedFiles.push(absolutePath);
|
||||
});
|
||||
|
||||
console.log('\n');
|
||||
console.log('----------------------------');
|
||||
console.log(' Files that exists license: ');
|
||||
console.log('----------------------------');
|
||||
if (passFiles.length) {
|
||||
if (isVerbose) {
|
||||
passFiles.forEach(function (path) {
|
||||
console.log(chalk.green(path));
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log(chalk.green(passFiles.length + ' files. (use argument "--verbose" see details)'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.log('Nothing.');
|
||||
}
|
||||
|
||||
console.log('\n');
|
||||
console.log('--------------------');
|
||||
console.log(' License added for: ');
|
||||
console.log('--------------------');
|
||||
if (updatedFiles.length) {
|
||||
updatedFiles.forEach(function (path) {
|
||||
console.log(chalk.green(path));
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log('Nothing.');
|
||||
}
|
||||
|
||||
console.log('\n');
|
||||
console.log('----------------');
|
||||
console.log(' Pending files: ');
|
||||
console.log('----------------');
|
||||
if (pendingFiles.length) {
|
||||
pendingFiles.forEach(function (path) {
|
||||
console.log(chalk.red(path));
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log('Nothing.');
|
||||
}
|
||||
|
||||
console.log('\nDone.');
|
||||
}
|
||||
|
||||
function eachFile(visit) {
|
||||
|
||||
const excludePatterns = [];
|
||||
const extReg = /\.([a-zA-Z0-9_-]+)$/;
|
||||
|
||||
prepareExcludePatterns();
|
||||
travel('./');
|
||||
|
||||
function travel(relativePath) {
|
||||
if (isExclude(relativePath)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const absolutePath = pathTool.join(ecBasePath, relativePath);
|
||||
const stat = fs.statSync(absolutePath);
|
||||
|
||||
if (stat.isFile()) {
|
||||
visit(absolutePath, getExt(absolutePath));
|
||||
}
|
||||
else if (stat.isDirectory()) {
|
||||
fs.readdirSync(relativePath).forEach(function (file) {
|
||||
travel(pathTool.join(relativePath, file));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function prepareExcludePatterns() {
|
||||
const content = fs.readFileSync(excludesPath, {encoding: 'utf-8'});
|
||||
content.replace(/\r/g, '\n').split('\n').forEach(function (line) {
|
||||
line = line.trim();
|
||||
if (line && line.charAt(0) !== '#') {
|
||||
excludePatterns.push(new RegExp(line));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function isExclude(relativePath) {
|
||||
for (let i = 0; i < excludePatterns.length; i++) {
|
||||
if (excludePatterns[i].test(relativePath)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getExt(path) {
|
||||
if (path) {
|
||||
const mathResult = path.match(extReg);
|
||||
return mathResult && mathResult[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const preamble = require('./preamble');
|
||||
const ts = require('typescript');
|
||||
const path = require('path');
|
||||
const fsExtra = require('fs-extra');
|
||||
|
||||
const umdWrapperHead = `
|
||||
${preamble.js}
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
`;
|
||||
|
||||
const umdWrapperHeadWithEcharts = `
|
||||
${preamble.js}
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
`;
|
||||
|
||||
const umdWrapperTail = `
|
||||
});`;
|
||||
|
||||
async function buildI18nWrap() {
|
||||
const targetDir = path.join(__dirname, '../i18n');
|
||||
const sourceDir = path.join(__dirname, '../src/i18n');
|
||||
const files = fs.readdirSync(sourceDir);
|
||||
files.forEach(t => {
|
||||
if(!t.startsWith('lang')) {
|
||||
return;
|
||||
}
|
||||
const fileName = t.replace(/\.ts$/, '');
|
||||
const type = fileName.replace(/^lang/, '');
|
||||
const echartsRegister = `
|
||||
echarts.registerLocale('${type}', localeObj);
|
||||
`;
|
||||
const pureExports = `
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
`;
|
||||
const code = fs.readFileSync(path.join(sourceDir, t), 'utf-8');
|
||||
// const outputText = ts.transpileModule(code, {
|
||||
// module: ts.ModuleKind.CommonJS,
|
||||
// }).outputText;
|
||||
// Simple regexp replace is enough
|
||||
const outputCode = code.replace(/export\s+?default/, 'var localeObj =')
|
||||
.replace(/\/\*([\w\W]*?)\*\//, '');
|
||||
|
||||
fsExtra.ensureDirSync(targetDir);
|
||||
|
||||
fs.writeFileSync(path.join(targetDir, fileName + '.js'), umdWrapperHeadWithEcharts + outputCode + echartsRegister + umdWrapperTail, 'utf-8');
|
||||
fs.writeFileSync(path.join(targetDir, fileName + '-obj.js'), umdWrapperHead + outputCode + pureExports + umdWrapperTail, 'utf-8');
|
||||
})
|
||||
console.log('i18n build completed');
|
||||
}
|
||||
|
||||
buildI18nWrap();
|
||||
|
||||
module.exports = {
|
||||
buildI18n: buildI18nWrap
|
||||
};
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const config = require('./config.js');
|
||||
const commander = require('commander');
|
||||
const chalk = require('chalk');
|
||||
const rollup = require('rollup');
|
||||
const prePublish = require('./pre-publish');
|
||||
const transformDEV = require('./transform-dev');
|
||||
|
||||
async function run() {
|
||||
|
||||
/**
|
||||
* Tips for `commander`:
|
||||
* (1) If arg xxx not specified, `commander.xxx` is undefined.
|
||||
* Otherwise:
|
||||
* If '-x, --xxx', `commander.xxx` can only be true/false, even if '--xxx yyy' input.
|
||||
* If '-x, --xxx <some>', the 'some' string is required, or otherwise error will be thrown.
|
||||
* If '-x, --xxx [some]', the 'some' string is optional, that is, `commander.xxx` can be boolean or string.
|
||||
* (2) `node ./build/build.js --help` will print helper info and exit.
|
||||
*/
|
||||
|
||||
let descIndent = ' ';
|
||||
let egIndent = ' ';
|
||||
|
||||
commander
|
||||
.usage('[options]')
|
||||
.description([
|
||||
'Build echarts and generate result files in directory `echarts/dist`.',
|
||||
'',
|
||||
' For example:',
|
||||
'',
|
||||
egIndent + 'node build/build.js --prepublish'
|
||||
+ '\n' + descIndent + '# Only prepublish.',
|
||||
egIndent + 'node build/build.js --type ""'
|
||||
+ '\n' + descIndent + '# Only generate `dist/echarts.js`.',
|
||||
egIndent + 'node build/build.js --type common --min'
|
||||
+ '\n' + descIndent + '# Only generate `dist/echarts.common.min.js`.',
|
||||
egIndent + 'node build/build.js --type simple --min'
|
||||
+ '\n' + descIndent + '# Only generate `dist/echarts-en.simple.min.js`.',
|
||||
].join('\n'))
|
||||
.option(
|
||||
'--prepublish',
|
||||
'Build all for release'
|
||||
)
|
||||
.option(
|
||||
'--min',
|
||||
'Whether to compress the output file, and remove error-log-print code.'
|
||||
)
|
||||
.option(
|
||||
'--type <type name>', [
|
||||
'Can be "simple" or "common" or "all" (default). Or can be simple,common,all to build multiple. For example,',
|
||||
descIndent + '`--type ""` or `--type "common"`.'
|
||||
].join('\n'))
|
||||
.option(
|
||||
'--format <format>',
|
||||
'The format of output bundle. Can be "umd", "amd", "iife", "cjs", "esm".'
|
||||
)
|
||||
.parse(process.argv);
|
||||
|
||||
let isPrePublish = !!commander.prepublish;
|
||||
let buildType = commander.type || 'all';
|
||||
|
||||
let opt = {
|
||||
min: commander.min,
|
||||
format: commander.format || 'umd'
|
||||
};
|
||||
|
||||
validateIO(opt.input, opt.output);
|
||||
|
||||
if (isPrePublish) {
|
||||
await prePublish();
|
||||
}
|
||||
else if (buildType === 'extension') {
|
||||
const cfgs = [
|
||||
config.createBMap(opt),
|
||||
config.createDataTool(opt)
|
||||
];
|
||||
await build(cfgs);
|
||||
}
|
||||
else if (buildType === 'myTransform') {
|
||||
const cfgs = [
|
||||
config.createMyTransform(opt)
|
||||
];
|
||||
await build(cfgs);
|
||||
}
|
||||
else {
|
||||
const types = buildType.split(',').map(a => a.trim());
|
||||
const cfgs = types.map(type =>
|
||||
config.createECharts({
|
||||
...opt,
|
||||
type
|
||||
})
|
||||
);
|
||||
await build(cfgs);
|
||||
}
|
||||
}
|
||||
|
||||
function checkBundleCode(cfg) {
|
||||
// Make sure process.env.NODE_ENV is eliminated.
|
||||
for (let output of cfg.output) {
|
||||
let code = fs.readFileSync(output.file, {encoding: 'utf-8'});
|
||||
if (!code) {
|
||||
throw new Error(`${output.file} is empty`);
|
||||
}
|
||||
transformDEV.recheckDEV(code);
|
||||
console.log(chalk.green.dim('Check code: correct.'));
|
||||
}
|
||||
}
|
||||
|
||||
function validateIO(input, output) {
|
||||
if ((input != null && output == null)
|
||||
|| (input == null && output != null)
|
||||
) {
|
||||
throw new Error('`input` and `output` must be both set.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array.<Object>} configs A list of rollup configs:
|
||||
* See: <https://rollupjs.org/#big-list-of-options>
|
||||
* For example:
|
||||
* [
|
||||
* {
|
||||
* ...inputOptions,
|
||||
* output: [outputOptions],
|
||||
* },
|
||||
* ...
|
||||
* ]
|
||||
*/
|
||||
async function build(configs) {
|
||||
console.log(chalk.yellow(`
|
||||
NOTICE: If you are using 'npm run build'. Run 'npm run prepublish' before build !!!
|
||||
`));
|
||||
|
||||
console.log(chalk.yellow(`
|
||||
NOTICE: If you are using syslink on zrender. Run 'npm run prepublish' in zrender first !!
|
||||
`));
|
||||
|
||||
for (let singleConfig of configs) {
|
||||
console.log(
|
||||
chalk.cyan.dim('\Bundling '),
|
||||
chalk.cyan(singleConfig.input)
|
||||
);
|
||||
|
||||
console.time('rollup build');
|
||||
const bundle = await rollup.rollup(singleConfig);
|
||||
|
||||
for (let output of singleConfig.output) {
|
||||
console.log(
|
||||
chalk.green.dim('Created '),
|
||||
chalk.green(output.file),
|
||||
chalk.green.dim(' successfully.')
|
||||
);
|
||||
|
||||
await bundle.write(output);
|
||||
|
||||
};
|
||||
console.timeEnd('rollup build');
|
||||
|
||||
checkBundleCode(singleConfig);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
await run();
|
||||
}
|
||||
catch (err) {
|
||||
console.log(chalk.red('BUILD ERROR!'));
|
||||
// rollup parse error.
|
||||
if (err) {
|
||||
if (err.loc) {
|
||||
console.warn(chalk.red(`${err.loc.file} (${err.loc.line}:${err.loc.column})`));
|
||||
console.warn(chalk.red(err.message));
|
||||
}
|
||||
if (err.frame) {
|
||||
console.warn(chalk.red(err.frame));
|
||||
}
|
||||
console.log(chalk.red(err ? err.stack : err));
|
||||
|
||||
err.id != null && console.warn(chalk.red(`id: ${err.id}`));
|
||||
err.hook != null && console.warn(chalk.red(`hook: ${err.hook}`));
|
||||
err.code != null && console.warn(chalk.red(`code: ${err.code}`));
|
||||
err.plugin != null && console.warn(chalk.red(`plugin: ${err.plugin}`));
|
||||
}
|
||||
// console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
const nodeResolvePlugin = require('@rollup/plugin-node-resolve').default;
|
||||
const nodePath = require('path');
|
||||
const ecDir = nodePath.resolve(__dirname, '..');
|
||||
const {terser} = require('rollup-plugin-terser');
|
||||
const replace = require('@rollup/plugin-replace');
|
||||
const MagicString = require('magic-string');
|
||||
const preamble = require('./preamble');
|
||||
|
||||
function createAddLicensePlugin(sourcemap) {
|
||||
return {
|
||||
renderChunk(code, chunk) {
|
||||
const s = new MagicString(code);
|
||||
s.prepend(preamble.js);
|
||||
return {
|
||||
code: s.toString(),
|
||||
map: sourcemap ? s.generateMap({ hires: true }).toString() : null
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function createOutputs(basename, { min }, commonOutputOpts) {
|
||||
commonOutputOpts = {
|
||||
format: 'umd',
|
||||
...commonOutputOpts
|
||||
}
|
||||
function createReplacePlugin(replacement) {
|
||||
const plugin = replace({
|
||||
'process.env.NODE_ENV': JSON.stringify(replacement)
|
||||
});
|
||||
// Remove transform hook. It will have warning when using in output
|
||||
delete plugin.transform;
|
||||
return plugin;
|
||||
}
|
||||
const output = [{
|
||||
...commonOutputOpts,
|
||||
// Disable sourcemap in
|
||||
sourcemap: true,
|
||||
plugins: [
|
||||
createReplacePlugin('development'),
|
||||
createAddLicensePlugin(true)
|
||||
],
|
||||
file: basename + '.js'
|
||||
}];
|
||||
|
||||
if (min) {
|
||||
output.push({
|
||||
...commonOutputOpts,
|
||||
// Disable sourcemap in min file.
|
||||
sourcemap: false,
|
||||
// TODO preamble
|
||||
plugins: [
|
||||
createReplacePlugin('production'),
|
||||
terser(),
|
||||
createAddLicensePlugin(false)
|
||||
],
|
||||
file: basename + '.min.js'
|
||||
})
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Object} [opt]
|
||||
* @param {string} [opt.type=''] 'all' or 'simple' or 'common', default is 'all'
|
||||
* @param {boolean} [opt.sourcemap] If set, `opt.input` is required too, and `opt.type` is ignored.
|
||||
* @param {string} [opt.format='umd'] If set, `opt.input` is required too, and `opt.type` is ignored.
|
||||
* @param {string} [opt.min=false] If build minified output
|
||||
* @param {boolean} [opt.addBundleVersion=false] Only for debug in watch, prompt that the two build is different.
|
||||
*/
|
||||
exports.createECharts = function (opt = {}) {
|
||||
const srcType = opt.type !== 'all' ? '.' + opt.type : '';
|
||||
const postfixType = srcType;
|
||||
const format = opt.format || 'umd';
|
||||
const postfixFormat = (format !== 'umd') ? '.' + format.toLowerCase() : '';
|
||||
|
||||
const input = nodePath.resolve(ecDir, `index${srcType}.js`);
|
||||
|
||||
return {
|
||||
plugins: [nodeResolvePlugin()],
|
||||
treeshake: {
|
||||
moduleSideEffects: false
|
||||
},
|
||||
|
||||
input: input,
|
||||
|
||||
output: createOutputs(
|
||||
nodePath.resolve(ecDir, `dist/echarts${postfixFormat}${postfixType}`),
|
||||
opt,
|
||||
{
|
||||
name: 'echarts',
|
||||
// Ignore default exports, which is only for compitable code like:
|
||||
// import echarts from 'echarts/lib/echarts';
|
||||
exports: 'named',
|
||||
format: format
|
||||
}
|
||||
)
|
||||
};
|
||||
};
|
||||
|
||||
exports.createBMap = function (opt) {
|
||||
const input = nodePath.resolve(ecDir, `extension/bmap/bmap.js`);
|
||||
|
||||
return {
|
||||
plugins: [nodeResolvePlugin()],
|
||||
input: input,
|
||||
external: ['echarts'],
|
||||
output: createOutputs(
|
||||
nodePath.resolve(ecDir, `dist/extension/bmap`),
|
||||
opt,
|
||||
{
|
||||
name: 'bmap',
|
||||
globals: {
|
||||
// For UMD `global.echarts`
|
||||
echarts: 'echarts'
|
||||
}
|
||||
}
|
||||
)
|
||||
};
|
||||
};
|
||||
|
||||
exports.createDataTool = function (opt) {
|
||||
let input = nodePath.resolve(ecDir, `extension/dataTool/index.js`);
|
||||
|
||||
return {
|
||||
plugins: [nodeResolvePlugin()],
|
||||
input: input,
|
||||
external: ['echarts'],
|
||||
output: createOutputs(
|
||||
nodePath.resolve(ecDir, `dist/extension/dataTool`),
|
||||
opt,
|
||||
{
|
||||
name: 'dataTool',
|
||||
globals: {
|
||||
// For UMD `global.echarts`
|
||||
echarts: 'echarts'
|
||||
}
|
||||
}
|
||||
)
|
||||
};
|
||||
};
|
||||
|
||||
exports.createMyTransform = function (opt) {
|
||||
let input = nodePath.resolve(ecDir, `test/lib/myTransform/src/index.ts`);
|
||||
|
||||
return {
|
||||
plugins: [nodeResolvePlugin()],
|
||||
input: input,
|
||||
output: createOutputs(
|
||||
nodePath.resolve(ecDir, `test/lib/myTransform/dist/myTransform`),
|
||||
opt,
|
||||
{
|
||||
name: 'myTransform'
|
||||
}
|
||||
)
|
||||
};
|
||||
};
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const {build} = require('esbuild');
|
||||
const commander = require('commander');
|
||||
const outFilePath = path.resolve(__dirname, '../dist/echarts.js');
|
||||
|
||||
const umdWrapperHead = `(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory((root.echarts = {}));
|
||||
}
|
||||
}(typeof self !== 'undefined' ? self : this, function (exports, b) {
|
||||
`;
|
||||
|
||||
const umdWrapperTail = `
|
||||
}));`;
|
||||
|
||||
build({
|
||||
entryPoints: [path.resolve(__dirname, '../src/echarts.all.ts')],
|
||||
outfile: outFilePath,
|
||||
format: 'cjs',
|
||||
sourcemap: true,
|
||||
bundle: true,
|
||||
banner: umdWrapperHead,
|
||||
footer: umdWrapperTail,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"development"',
|
||||
'__DEV__': 'true'
|
||||
},
|
||||
watch: {
|
||||
async onRebuild(error) {
|
||||
if (error) {
|
||||
console.error('watch build failed:', error)
|
||||
}
|
||||
else {
|
||||
console.log('Bundled with esbuild')
|
||||
}
|
||||
},
|
||||
},
|
||||
}).then(async () => {
|
||||
console.log('Bundled with esbuild')
|
||||
}).catch(e => console.error(e.toString()))
|
||||
+428
@@ -0,0 +1,428 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Create CommonJS files]:
|
||||
* Compatible with prevoius folder structure: `echarts/lib` exists in `node_modules`
|
||||
* (1) Build all files to CommonJS to `echarts/lib`.
|
||||
* (2) Remove __DEV__.
|
||||
* (3) Mount `echarts/src/export.js` to `echarts/lib/echarts.js`.
|
||||
*
|
||||
* [Create ESModule files]:
|
||||
* Build all files to CommonJS to `echarts/esm`.
|
||||
*/
|
||||
|
||||
const nodePath = require('path');
|
||||
const assert = require('assert');
|
||||
const fs = require('fs');
|
||||
const fsExtra = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const ts = require('typescript');
|
||||
const globby = require('globby');
|
||||
const transformDEVUtil = require('./transform-dev');
|
||||
const preamble = require('./preamble');
|
||||
const dts = require('@lang/rollup-plugin-dts').default;
|
||||
const rollup = require('rollup');
|
||||
const { transformImport } = require('zrender/build/transformImport');
|
||||
|
||||
const ecDir = nodePath.resolve(__dirname, '..');
|
||||
const tmpDir = nodePath.resolve(ecDir, 'pre-publish-tmp');
|
||||
|
||||
const tsConfig = readTSConfig();
|
||||
|
||||
const autoGeneratedFileAlert = `
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
`;
|
||||
|
||||
const mainSrcGlobby = {
|
||||
patterns: [
|
||||
'src/**/*.ts'
|
||||
],
|
||||
cwd: ecDir
|
||||
};
|
||||
const extensionSrcGlobby = {
|
||||
patterns: [
|
||||
'extension-src/**/*.ts'
|
||||
],
|
||||
cwd: ecDir
|
||||
};
|
||||
const extensionSrcDir = nodePath.resolve(ecDir, 'extension-src');
|
||||
const extensionESMDir = nodePath.resolve(ecDir, 'extension');
|
||||
|
||||
const typesDir = nodePath.resolve(ecDir, 'types');
|
||||
const esmDir = 'lib';
|
||||
|
||||
|
||||
const compileWorkList = [
|
||||
{
|
||||
logLabel: 'main ts -> js-esm',
|
||||
compilerOptionsOverride: {
|
||||
module: 'ES2015',
|
||||
rootDir: ecDir,
|
||||
outDir: tmpDir,
|
||||
// Generate types when buidling esm
|
||||
declaration: true,
|
||||
declarationDir: typesDir
|
||||
},
|
||||
srcGlobby: mainSrcGlobby,
|
||||
transformOptions: {
|
||||
filesGlobby: {patterns: ['**/*.js'], cwd: tmpDir},
|
||||
preamble: preamble.js,
|
||||
transformDEV: true
|
||||
},
|
||||
before: async function () {
|
||||
fsExtra.removeSync(tmpDir);
|
||||
fsExtra.removeSync(nodePath.resolve(ecDir, 'types'));
|
||||
fsExtra.removeSync(nodePath.resolve(ecDir, esmDir));
|
||||
fsExtra.removeSync(nodePath.resolve(ecDir, 'index.js'));
|
||||
fsExtra.removeSync(nodePath.resolve(ecDir, 'index.blank.js'));
|
||||
fsExtra.removeSync(nodePath.resolve(ecDir, 'index.common.js'));
|
||||
fsExtra.removeSync(nodePath.resolve(ecDir, 'index.simple.js'));
|
||||
},
|
||||
after: async function () {
|
||||
fs.renameSync(nodePath.resolve(tmpDir, 'src/echarts.all.js'), nodePath.resolve(ecDir, 'index.js'));
|
||||
fs.renameSync(nodePath.resolve(tmpDir, 'src/echarts.blank.js'), nodePath.resolve(ecDir, 'index.blank.js'));
|
||||
fs.renameSync(nodePath.resolve(tmpDir, 'src/echarts.common.js'), nodePath.resolve(ecDir, 'index.common.js'));
|
||||
fs.renameSync(nodePath.resolve(tmpDir, 'src/echarts.simple.js'), nodePath.resolve(ecDir, 'index.simple.js'));
|
||||
fs.renameSync(nodePath.resolve(tmpDir, 'src'), nodePath.resolve(ecDir, esmDir));
|
||||
|
||||
transformRootFolderInEntry(nodePath.resolve(ecDir, 'index.js'), esmDir);
|
||||
transformRootFolderInEntry(nodePath.resolve(ecDir, 'index.blank.js'), esmDir);
|
||||
transformRootFolderInEntry(nodePath.resolve(ecDir, 'index.common.js'), esmDir);
|
||||
transformRootFolderInEntry(nodePath.resolve(ecDir, 'index.simple.js'), esmDir);
|
||||
|
||||
await transformLibFiles(nodePath.resolve(ecDir, esmDir), esmDir);
|
||||
await transformLibFiles(nodePath.resolve(ecDir, 'types'), esmDir);
|
||||
fsExtra.removeSync(tmpDir);
|
||||
}
|
||||
},
|
||||
{
|
||||
logLabel: 'extension ts -> js-esm',
|
||||
compilerOptionsOverride: {
|
||||
module: 'ES2015',
|
||||
declaration: false,
|
||||
rootDir: extensionSrcDir,
|
||||
outDir: extensionESMDir
|
||||
},
|
||||
srcGlobby: extensionSrcGlobby,
|
||||
transformOptions: {
|
||||
filesGlobby: {patterns: ['**/*.js'], cwd: extensionESMDir},
|
||||
preamble: preamble.js,
|
||||
transformDEV: true
|
||||
},
|
||||
before: async function () {
|
||||
fsExtra.removeSync(extensionESMDir);
|
||||
},
|
||||
after: async function () {
|
||||
await transformLibFiles(extensionESMDir, 'lib');
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
module.exports = async function () {
|
||||
|
||||
for (let {
|
||||
logLabel, compilerOptionsOverride, srcGlobby,
|
||||
transformOptions, before, after
|
||||
} of compileWorkList) {
|
||||
|
||||
process.stdout.write(chalk.green.dim(`[${logLabel}]: compiling ...`));
|
||||
|
||||
before && await before();
|
||||
|
||||
let srcPathList = await readFilePaths(srcGlobby);
|
||||
|
||||
await tsCompile(compilerOptionsOverride, srcPathList);
|
||||
|
||||
process.stdout.write(chalk.green.dim(` done \n`));
|
||||
|
||||
process.stdout.write(chalk.green.dim(`[${logLabel}]: transforming ...`));
|
||||
|
||||
await transformCode(transformOptions);
|
||||
|
||||
after && await after();
|
||||
|
||||
process.stdout.write(chalk.green.dim(` done \n`));
|
||||
}
|
||||
|
||||
process.stdout.write(chalk.green.dim(`Generating entries ...`));
|
||||
generateEntries();
|
||||
process.stdout.write(chalk.green.dim(`Bundling DTS ...`));
|
||||
await bundleDTS();
|
||||
|
||||
console.log(chalk.green.dim('All done.'));
|
||||
};
|
||||
|
||||
async function runTsCompile(localTs, compilerOptions, srcPathList) {
|
||||
// Must do it. becuase the value in tsconfig.json might be different from the inner representation.
|
||||
// For example: moduleResolution: "NODE" => moduleResolution: 2
|
||||
const {options, errors} = localTs.convertCompilerOptionsFromJson(compilerOptions, ecDir);
|
||||
|
||||
if (errors.length) {
|
||||
let errMsg = 'tsconfig parse failed: '
|
||||
+ errors.map(error => error.messageText).join('. ')
|
||||
+ '\n compilerOptions: \n' + JSON.stringify(compilerOptions, null, 4);
|
||||
assert(false, errMsg);
|
||||
}
|
||||
|
||||
// See: https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API
|
||||
|
||||
let program = localTs.createProgram(srcPathList, options);
|
||||
let emitResult = program.emit();
|
||||
|
||||
let allDiagnostics = localTs
|
||||
.getPreEmitDiagnostics(program)
|
||||
.concat(emitResult.diagnostics);
|
||||
|
||||
allDiagnostics.forEach(diagnostic => {
|
||||
if (diagnostic.file) {
|
||||
let {line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
||||
let message = localTs.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
|
||||
console.log(chalk.red(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`));
|
||||
}
|
||||
else {
|
||||
console.log(chalk.red(localTs.flattenDiagnosticMessageText(diagnostic.messageText, '\n')));
|
||||
}
|
||||
});
|
||||
if (allDiagnostics.length > 0) {
|
||||
throw new Error('TypeScript Compile Failed')
|
||||
}
|
||||
}
|
||||
module.exports.runTsCompile = runTsCompile;
|
||||
|
||||
async function tsCompile(compilerOptionsOverride, srcPathList) {
|
||||
assert(
|
||||
compilerOptionsOverride
|
||||
&& compilerOptionsOverride.module
|
||||
&& compilerOptionsOverride.rootDir
|
||||
&& compilerOptionsOverride.outDir
|
||||
);
|
||||
|
||||
let compilerOptions = {
|
||||
...tsConfig.compilerOptions,
|
||||
...compilerOptionsOverride,
|
||||
sourceMap: false
|
||||
};
|
||||
|
||||
runTsCompile(ts, compilerOptions, srcPathList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform import/require path in the entry file to `esm` or `lib`.
|
||||
*/
|
||||
function transformRootFolderInEntry(entryFile, replacement) {
|
||||
let code = fs.readFileSync(entryFile, 'utf-8');
|
||||
// Simple regex replacement
|
||||
// TODO More robust way?
|
||||
assert(
|
||||
!/(import\s+|from\s+|require\(\s*)["']\.\/echarts\./.test(code)
|
||||
&& !/(import\s+|from\s+|require\(\s*)["']echarts\./.test(code),
|
||||
'Import echarts.xxx.ts is not supported.'
|
||||
);
|
||||
code = code.replace(/((import\s+|from\s+|require\(\s*)["'])\.\//g, `$1./${replacement}/`);
|
||||
fs.writeFileSync(
|
||||
entryFile,
|
||||
// Also transform zrender.
|
||||
singleTransformImport(code, replacement),
|
||||
'utf-8'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform `zrender/src` to `zrender/lib` in all files
|
||||
*/
|
||||
async function transformLibFiles(rooltFolder, replacement) {
|
||||
const files = await readFilePaths({
|
||||
patterns: ['**/*.js', '**/*.d.ts'],
|
||||
cwd: rooltFolder
|
||||
});
|
||||
// Simple regex replacement
|
||||
// TODO More robust way?
|
||||
for (let fileName of files) {
|
||||
let code = fs.readFileSync(fileName, 'utf-8');
|
||||
code = singleTransformImport(code, replacement);
|
||||
// For lower ts version, not use import type
|
||||
// TODO Use https://github.com/sandersn/downlevel-dts ?
|
||||
// if (fileName.endsWith('.d.ts')) {
|
||||
// code = singleTransformImportType(code);
|
||||
// }
|
||||
fs.writeFileSync(fileName, code, 'utf-8');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Transform zrender/src to zrender/lib
|
||||
* 2. Add .js extensions
|
||||
*/
|
||||
function singleTransformImport(code, replacement) {
|
||||
return transformImport(
|
||||
code.replace(/([\"\'])zrender\/src\//g, `$1zrender/${replacement}/`),
|
||||
(moduleName) => {
|
||||
// Ignore 'tslib' and 'echarts' in the extensions.
|
||||
if (moduleName === 'tslib' || moduleName === 'echarts') {
|
||||
return moduleName;
|
||||
}
|
||||
else if (moduleName === 'zrender/lib/export') {
|
||||
throw new Error('Should not import the whole zrender library.');
|
||||
}
|
||||
else if (moduleName.endsWith('.ts')) {
|
||||
// Replace ts with js
|
||||
return moduleName.replace(/\.ts$/, '.js');
|
||||
}
|
||||
else if (moduleName.endsWith('.js')) {
|
||||
return moduleName;
|
||||
}
|
||||
else {
|
||||
return moduleName + '.js'
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// function singleTransformImportType(code) {
|
||||
// return code.replace(/import\s+type\s+/g, 'import ');
|
||||
// }
|
||||
|
||||
/**
|
||||
* @param {Object} transformOptions
|
||||
* @param {Object} transformOptions.filesGlobby {patterns: string[], cwd: string}
|
||||
* @param {string} [transformOptions.preamble] See './preamble.js'
|
||||
* @param {boolean} [transformOptions.transformDEV]
|
||||
*/
|
||||
async function transformCode({filesGlobby, preamble, transformDEV}) {
|
||||
|
||||
let filePaths = await readFilePaths(filesGlobby);
|
||||
|
||||
filePaths.map(filePath => {
|
||||
let code = fs.readFileSync(filePath, 'utf8');
|
||||
|
||||
if (transformDEV) {
|
||||
let result = transformDEVUtil.transform(code, false);
|
||||
code = result.code;
|
||||
}
|
||||
|
||||
code = autoGeneratedFileAlert + code;
|
||||
|
||||
if (preamble) {
|
||||
code = preamble + code;
|
||||
}
|
||||
|
||||
fs.writeFileSync(filePath, code, 'utf8');
|
||||
});
|
||||
}
|
||||
|
||||
async function readFilePaths({patterns, cwd}) {
|
||||
assert(patterns && cwd);
|
||||
return (
|
||||
await globby(patterns, {cwd})
|
||||
).map(
|
||||
srcPath => nodePath.resolve(cwd, srcPath)
|
||||
);
|
||||
}
|
||||
|
||||
async function bundleDTS() {
|
||||
|
||||
const outDir = nodePath.resolve(__dirname, '../types/dist');
|
||||
const commonConfig = {
|
||||
onwarn(warning, rollupWarn) {
|
||||
// Not warn circular dependency
|
||||
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
|
||||
rollupWarn(warning);
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
dts({
|
||||
respectExternal: true
|
||||
})
|
||||
// {
|
||||
// generateBundle(options, bundle) {
|
||||
// for (let chunk of Object.values(bundle)) {
|
||||
// chunk.code = `
|
||||
// type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
||||
// ${chunk.code}`
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
]
|
||||
};
|
||||
|
||||
// Bundle chunks.
|
||||
const parts = [
|
||||
'core', 'charts', 'components', 'renderers', 'option', 'features'
|
||||
];
|
||||
const inputs = {};
|
||||
parts.forEach(partName => {
|
||||
inputs[partName] = nodePath.resolve(__dirname, `../types/src/export/${partName}.d.ts`)
|
||||
});
|
||||
|
||||
const bundle = await rollup.rollup({
|
||||
input: inputs,
|
||||
...commonConfig
|
||||
});
|
||||
let idx = 1;
|
||||
await bundle.write({
|
||||
dir: outDir,
|
||||
minifyInternalExports: false,
|
||||
manualChunks: (id) => {
|
||||
// Only create one chunk.
|
||||
return 'shared';
|
||||
},
|
||||
chunkFileNames: 'shared.d.ts'
|
||||
});
|
||||
|
||||
// Bundle all in one
|
||||
const bundleAllInOne = await rollup.rollup({
|
||||
input: nodePath.resolve(__dirname, `../types/src/export/all.d.ts`),
|
||||
...commonConfig
|
||||
});
|
||||
await bundleAllInOne.write({
|
||||
file: nodePath.resolve(outDir, 'echarts.d.ts')
|
||||
});
|
||||
}
|
||||
|
||||
function readTSConfig() {
|
||||
// tsconfig.json may have comment string, which is invalid if
|
||||
// using `require('tsconfig.json'). So we use a loose parser.
|
||||
let filePath = nodePath.resolve(ecDir, 'tsconfig.json');
|
||||
const tsConfigText = fs.readFileSync(filePath, {encoding: 'utf8'});
|
||||
return (new Function(`return ( ${tsConfigText} )`))();
|
||||
}
|
||||
|
||||
|
||||
function generateEntries() {
|
||||
['charts', 'components', 'renderers', 'core', 'features'].forEach(entryName => {
|
||||
if (entryName !== 'option') {
|
||||
const jsCode = fs.readFileSync(nodePath.join(__dirname, `template/${entryName}.js`), 'utf-8');
|
||||
fs.writeFileSync(nodePath.join(__dirname, `../${entryName}.js`), jsCode, 'utf-8');
|
||||
}
|
||||
|
||||
const dtsCode = fs.readFileSync(nodePath.join(__dirname, `/template/${entryName}.d.ts`), 'utf-8');
|
||||
fs.writeFileSync(nodePath.join(__dirname, `../${entryName}.d.ts`), dtsCode, 'utf-8');
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.readTSConfig = readTSConfig;
|
||||
+231
@@ -0,0 +1,231 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
const cStyleComment = `
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
`;
|
||||
|
||||
const hashComment = `
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
`;
|
||||
|
||||
const mlComment = `
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
`;
|
||||
|
||||
function hasPreamble(fileExt) {
|
||||
return fileExt && preambleMap[fileExt];
|
||||
}
|
||||
|
||||
function addPreamble(fileStr, fileExt) {
|
||||
if (fileStr && fileExt) {
|
||||
const addFn = addFns[fileExt];
|
||||
const headStr = preambleMap[fileExt];
|
||||
return addFn && headStr && addFn(headStr, fileStr);
|
||||
}
|
||||
}
|
||||
|
||||
const addFns = {
|
||||
|
||||
ts: function (headStr, fileStr) {
|
||||
return headStr + fileStr;
|
||||
},
|
||||
|
||||
js: function (headStr, fileStr) {
|
||||
return headStr + fileStr;
|
||||
},
|
||||
|
||||
css: function (headStr, fileStr) {
|
||||
return headStr + fileStr;
|
||||
},
|
||||
|
||||
java: function (headStr, fileStr) {
|
||||
return headStr + fileStr;
|
||||
},
|
||||
|
||||
yml: addShellLikeHeader,
|
||||
|
||||
yaml: addShellLikeHeader,
|
||||
|
||||
sh: addShellLikeHeader,
|
||||
|
||||
html: function (headStr, fileStr) {
|
||||
// Git diff enables manual check.
|
||||
let resultStr = fileStr.replace(/^\s*<!DOCTYPE\s[^<>]+>/i, '$&' + headStr);
|
||||
// If no doctype
|
||||
if (resultStr.length === fileStr.length) {
|
||||
resultStr = headStr + fileStr;
|
||||
}
|
||||
return resultStr;
|
||||
},
|
||||
|
||||
xml: xmlAddFn,
|
||||
|
||||
xsl: xmlAddFn
|
||||
};
|
||||
|
||||
function addShellLikeHeader(headStr, fileStr) {
|
||||
// Git diff enables manual check.
|
||||
if (/^#\!/.test(fileStr)) {
|
||||
const lines = fileStr.split('\n');
|
||||
lines.splice(1, 0, headStr);
|
||||
return lines.join('\n');
|
||||
}
|
||||
else {
|
||||
return headStr + fileStr;
|
||||
}
|
||||
}
|
||||
|
||||
function xmlAddFn(headStr, fileStr) {
|
||||
// Git diff enables manual check.
|
||||
let resultStr = fileStr.replace(/^\s*<\?xml\s[^<>]+\?>/i, '$&' + headStr);
|
||||
// If no <?xml version='1.0' ?>
|
||||
if (resultStr.length === fileStr.length) {
|
||||
resultStr = headStr + fileStr;
|
||||
}
|
||||
return resultStr;
|
||||
}
|
||||
|
||||
const preambleMap = {
|
||||
ts: cStyleComment,
|
||||
js: cStyleComment,
|
||||
css: cStyleComment,
|
||||
java: cStyleComment,
|
||||
yml: hashComment,
|
||||
yaml: hashComment,
|
||||
sh: hashComment,
|
||||
html: mlComment,
|
||||
xml: mlComment,
|
||||
xsl: mlComment
|
||||
};
|
||||
|
||||
const licenseReg = [
|
||||
{name: 'Apache', reg: /apache (license|commons)/i},
|
||||
{name: 'BSD', reg: /BSD/},
|
||||
{name: 'LGPL', reg: /LGPL/},
|
||||
{name: 'GPL', reg: /GPL/},
|
||||
{name: 'Mozilla', reg: /mozilla public/i},
|
||||
{name: 'MIT', reg: /mit license/i},
|
||||
{name: 'BSD-d3', reg: /Copyright\s+\(c\)\s+2010-2015,\s+Michael\s+Bostock/i}
|
||||
];
|
||||
|
||||
function extractLicense(fileStr, fileExt) {
|
||||
let commentText = extractComment(fileStr.trim(), fileExt);
|
||||
if (!commentText) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < licenseReg.length; i++) {
|
||||
if (licenseReg[i].reg.test(commentText)) {
|
||||
return licenseReg[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const cStyleCommentReg = /\/\*[\S\s]*?\*\//;
|
||||
const hashCommentReg = /^\s*#.*$/gm;
|
||||
const mlCommentReg = /<\!\-\-[\S\s]*?\-\->/;
|
||||
const commentReg = {
|
||||
ts: cStyleCommentReg,
|
||||
js: cStyleCommentReg,
|
||||
css: cStyleCommentReg,
|
||||
java: cStyleCommentReg,
|
||||
yml: hashCommentReg,
|
||||
yaml: hashCommentReg,
|
||||
sh: hashCommentReg,
|
||||
html: mlCommentReg,
|
||||
xml: mlCommentReg,
|
||||
xsl: mlCommentReg
|
||||
};
|
||||
|
||||
function extractComment(str, fileExt) {
|
||||
const reg = commentReg[fileExt];
|
||||
|
||||
if (!fileExt || !reg || !str) {
|
||||
return;
|
||||
}
|
||||
|
||||
reg.lastIndex = 0;
|
||||
|
||||
if (fileExt === 'sh' || fileExt === 'yml' || fileExt === 'yaml') {
|
||||
let result = str.match(reg);
|
||||
return result && result.join('\n');
|
||||
}
|
||||
else {
|
||||
let result = reg.exec(str);
|
||||
return result && result[0];
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Object.assign({
|
||||
extractLicense,
|
||||
hasPreamble,
|
||||
addPreamble
|
||||
}, preambleMap);
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
const fs = require('fs');
|
||||
const packageJsonPath = __dirname + '/../package.json';
|
||||
const nightlyPackageName = 'echarts-nightly';
|
||||
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
||||
|
||||
function updateVersion(version) {
|
||||
const isNext = process.argv.includes('--next');
|
||||
const parts = /(\d+)\.(\d+)\.(\d+)($|\-)/.exec(version);
|
||||
if (!parts) {
|
||||
throw new Error(`Invalid version number ${version}`);
|
||||
}
|
||||
// Add date to version.
|
||||
const major = +parts[1];
|
||||
let minor = +parts[2];
|
||||
let patch = +parts[3];
|
||||
const isStable = !parts[4];
|
||||
if (isStable) {
|
||||
// It's previous stable version. Dev version should be higher.
|
||||
if (isNext) {
|
||||
// Increase minor version for next branch.
|
||||
minor++;
|
||||
patch = 0;
|
||||
}
|
||||
else {
|
||||
// Increase main version for master branch.
|
||||
patch++;
|
||||
}
|
||||
}
|
||||
|
||||
const date = new Date().toISOString().replace(/:|T|\.|-/g, '').slice(0, 8);
|
||||
return `${major}.${minor}.${patch}-dev.${date}`;
|
||||
}
|
||||
|
||||
packageJson.name = nightlyPackageName;
|
||||
packageJson.version = updateVersion(packageJson.version);
|
||||
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');
|
||||
|
||||
|
||||
const readmePath = __dirname + '/../README.md';
|
||||
const readmeAttention = `<h3>
|
||||
<p><em>⚠️ ATTENTION PLEASE</em></p>
|
||||
<p><em>This is nightly build of Apache ECharts. Please DON't use it in your production environment.</em></p>
|
||||
</h3>`;
|
||||
const readmeContent = fs.readFileSync(readmePath, 'utf-8');
|
||||
if (!readmeContent.includes(readmeAttention)) {
|
||||
fs.writeFileSync(readmePath, `
|
||||
${readmeAttention}
|
||||
|
||||
${readmeContent}
|
||||
`, 'utf-8');
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
// Prepare release materials like mail, release note
|
||||
|
||||
const commander = require('commander');
|
||||
const fse = require('fs-extra');
|
||||
const pathTool = require('path');
|
||||
const https = require('https');
|
||||
|
||||
commander
|
||||
.usage('[options]')
|
||||
.description([
|
||||
'Generate source release'
|
||||
].join('\n'))
|
||||
.option(
|
||||
'--rcversion <version>',
|
||||
'Release version'
|
||||
)
|
||||
.option(
|
||||
'--commit <commit>',
|
||||
'Hash of commit'
|
||||
)
|
||||
.option(
|
||||
'--repo <repo>',
|
||||
'Repo'
|
||||
)
|
||||
.option(
|
||||
'--out <out>',
|
||||
'Out directory. Default to be tmp/release-mail'
|
||||
)
|
||||
.parse(process.argv);
|
||||
|
||||
const outDir = pathTool.resolve(process.cwd(), commander.out || 'tmp/release-materials');
|
||||
const releaseCommit = commander.commit;
|
||||
if (!releaseCommit) {
|
||||
throw new Error('Release commit is required');
|
||||
}
|
||||
const repo = commander.repo || 'apache/echarts';
|
||||
|
||||
let rcVersion = commander.rcversion + '';
|
||||
if (rcVersion.startsWith('v')) { // tag may have v prefix, v5.1.0
|
||||
rcVersion = rcVersion.substr(1);
|
||||
}
|
||||
if (rcVersion.indexOf('-rc.') < 0) {
|
||||
throw new Error('Only rc version is accepeted.');
|
||||
}
|
||||
|
||||
const parts = /(\d+)\.(\d+)\.(\d+)\-rc\.(\d+)/.exec(rcVersion);
|
||||
if (!parts) {
|
||||
throw new Error(`Invalid version number ${rcVersion}`);
|
||||
}
|
||||
|
||||
const major = +parts[1];
|
||||
const minor = +parts[2];
|
||||
const patch = +parts[3];
|
||||
const rc = +parts[4];
|
||||
|
||||
const stableVersion = `${major}.${minor}.${patch}`;
|
||||
const releaseFullName = `Apache ECharts ${stableVersion} (release candidate ${rc})`;
|
||||
|
||||
console.log('[Release Repo] ' + repo);
|
||||
console.log('[Release Verion] ' + rcVersion);
|
||||
console.log('[Release Commit] ' + releaseCommit);
|
||||
console.log('[Release Name] ' + releaseFullName);
|
||||
|
||||
const voteTpl = fse.readFileSync(pathTool.join(__dirname, './template/vote-release.tpl'), 'utf-8');
|
||||
const voteResultTpl = fse.readFileSync(pathTool.join(__dirname, './template/vote-result.tpl'), 'utf-8');
|
||||
const announceTpl = fse.readFileSync(pathTool.join(__dirname, './template/announce-release.tpl'), 'utf-8');
|
||||
const voteUntil = new Date(+new Date() + (72 + 12) * 3600 * 1000); // 3.5 day.
|
||||
|
||||
fse.ensureDirSync(outDir);
|
||||
fse.writeFileSync(
|
||||
pathTool.resolve(outDir, 'vote.txt'),
|
||||
voteTpl.replace(/{{ECHARTS_RELEASE_VERSION}}/g, rcVersion)
|
||||
.replace(/{{ECHARTS_RELEASE_VERSION_FULL_NAME}}/g, releaseFullName)
|
||||
.replace(/{{ECHARTS_RELEASE_COMMIT}}/g, releaseCommit)
|
||||
.replace(/{{VOTE_UNTIL}}/g, voteUntil.toISOString()),
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
fse.ensureDirSync(outDir);
|
||||
fse.writeFileSync(
|
||||
pathTool.resolve(outDir, 'vote-result.txt'),
|
||||
voteResultTpl.replace(/{{ECHARTS_RELEASE_VERSION}}/g, rcVersion)
|
||||
.replace(/{{ECHARTS_RELEASE_VERSION_FULL_NAME}}/g, releaseFullName),
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
fse.writeFileSync(
|
||||
pathTool.resolve(outDir, 'announce.txt'),
|
||||
announceTpl.replace(/{{ECHARTS_RELEASE_VERSION}}/g, stableVersion)
|
||||
.replace(/{{ECHARTS_RELEASE_COMMIT}}/g, releaseCommit),
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
|
||||
// Fetch RELEASE_NOTE
|
||||
https.get({
|
||||
hostname: 'api.github.com',
|
||||
path: `/repos/${repo}/releases`,
|
||||
headers: {
|
||||
'User-Agent': 'NodeJS'
|
||||
}
|
||||
}, function (res) {
|
||||
console.log(`https://api.github.com/repos/${repo}/releases`);
|
||||
if (res.statusCode !== 200) {
|
||||
console.error(`Failed to fetch releases ${res.statusCode}`);
|
||||
res.resume();
|
||||
return;
|
||||
}
|
||||
|
||||
res.setEncoding('utf8');
|
||||
let rawData = '';
|
||||
res.on('data', (chunk) => {
|
||||
rawData += chunk;
|
||||
});
|
||||
res.on('end', () => {
|
||||
let releaseNote = '';
|
||||
|
||||
const releases = JSON.parse(rawData);
|
||||
const found = releases.find(release => release.name === rcVersion);
|
||||
if (!found) {
|
||||
throw 'Can\'t found release';
|
||||
}
|
||||
else {
|
||||
releaseNote = found.body.trim();
|
||||
if (!releaseNote) {
|
||||
throw 'Release description is empty';
|
||||
}
|
||||
}
|
||||
|
||||
const firstLine = releaseNote.split('\n')[0];
|
||||
if (firstLine.indexOf(stableVersion) < 0) {
|
||||
// Add version if release note is not start with version.
|
||||
}
|
||||
releaseNote = `## ${stableVersion}\n\n${releaseNote}`;
|
||||
|
||||
fse.writeFileSync(
|
||||
pathTool.resolve(outDir, 'RELEASE_NOTE.txt'),
|
||||
releaseNote,
|
||||
'utf-8'
|
||||
);
|
||||
});
|
||||
}).on('error', (e) => {
|
||||
throw e;
|
||||
});
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
--- Mail to: ---
|
||||
dev@echarts.apache.org
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
--- Subject: ---
|
||||
[ANNOUNCE] Release Apache ECharts {{ECHARTS_RELEASE_VERSION}}
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Hi all,
|
||||
|
||||
The Apache ECharts team is proud to announce Apache ECharts {{ECHARTS_RELEASE_VERSION}}.
|
||||
|
||||
Apache ECharts is a powerful, interactive charting and data visualization library for browser.
|
||||
|
||||
Download Links: https://echarts.apache.org/download.html
|
||||
|
||||
Release Notes: https://echarts.apache.org/changelog.html
|
||||
|
||||
Website: https://echarts.apache.org/
|
||||
|
||||
|
||||
ECharts Resources:
|
||||
- Issue: https://github.com/apache/echarts/issues
|
||||
- Build Guide: https://github.com/apache/echarts/blob/{{ECHARTS_RELEASE_VERSION}}/README.md
|
||||
- Mailing list: dev@echarts.apache.org
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
--- Mail To: ---
|
||||
dev@echarts.apache.org
|
||||
-----------------------------------------------------------
|
||||
|
||||
--- Subject: ---
|
||||
[VOTE] Release {{ECHARTS_RELEASE_VERSION_FULL_NAME}}
|
||||
-----------------------------------------------------------
|
||||
|
||||
Dear community,
|
||||
|
||||
We are pleased to be calling this vote for the release of {{ECHARTS_RELEASE_VERSION_FULL_NAME}}.
|
||||
|
||||
The release candidate to be voted over is available at:
|
||||
https://dist.apache.org/repos/dist/dev/echarts/{{ECHARTS_RELEASE_VERSION}}/
|
||||
|
||||
The release candidate is signed with a GPG key available at:
|
||||
https://dist.apache.org/repos/dist/dev/echarts/KEYS
|
||||
|
||||
The Git commit for this release is:
|
||||
https://gitbox.apache.org/repos/asf?p=echarts.git;a=commit;h={{ECHARTS_RELEASE_COMMIT}}
|
||||
|
||||
The Release Note is available in:
|
||||
https://dist.apache.org/repos/dist/dev/echarts/{{ECHARTS_RELEASE_VERSION}}/RELEASE_NOTE.txt
|
||||
|
||||
Build Guide:
|
||||
https://github.com/apache/echarts/blob/{{ECHARTS_RELEASE_VERSION}}/README.md#build
|
||||
|
||||
NPM Install:
|
||||
npm i echarts@{{ECHARTS_RELEASE_VERSION}}
|
||||
https://www.npmjs.com/package/echarts/v/{{ECHARTS_RELEASE_VERSION}}
|
||||
|
||||
Please vote on releasing this package as:
|
||||
{{ECHARTS_RELEASE_VERSION_FULL_NAME}}
|
||||
by "{{VOTE_UNTIL}}".
|
||||
|
||||
[ ] +1 Release this package
|
||||
[ ] 0 I don't feel strongly about it, but don't object
|
||||
[ ] -1 Do not release this package because...
|
||||
|
||||
Anyone can participate in testing and voting, not just committers, please
|
||||
feel free to try out the release candidate and provide your votes.
|
||||
|
||||
A checklist for reference:
|
||||
https://cwiki.apache.org/confluence/display/ECHARTS/Apache+ECharts+Release+Checklist
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
--- Mail To: ---
|
||||
dev@echarts.apache.org
|
||||
-----------------------------------------------------------
|
||||
|
||||
--- Subject: ---
|
||||
[RESULT] [VOTE] Release {{ECHARTS_RELEASE_VERSION_FULL_NAME}}
|
||||
-----------------------------------------------------------
|
||||
|
||||
Thanks to all who voted or provided comments!
|
||||
|
||||
We received ______NUMBER_OF_+1_VOTES______ +1 votes from the PMC members, and the release has PASSED:
|
||||
|
||||
+1 ______NAME______ (binding)
|
||||
|
||||
Other votes from the community:
|
||||
|
||||
+1 ______NAME______
|
||||
|
||||
Vote thread:
|
||||
https://lists.apache.org/thread/xxx
|
||||
|
||||
I'm going to release the source release of Apache ECharts {{ECHARTS_RELEASE_VERSION}}.
|
||||
Thank you all for making this happen!
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/charts';
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
// In somehow. If we export like
|
||||
// export * as LineChart './chart/line/install'
|
||||
// The exported code will be transformed to
|
||||
// import * as LineChart_1 './chart/line/install'; export {LineChart_1 as LineChart};
|
||||
// Treeshaking in webpack will not work even if we configured sideEffects to false in package.json
|
||||
|
||||
export * from './lib/export/charts.js';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/components';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './lib/export/components.js';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/core';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './lib/export/core.js';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/features';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './lib/export/features.js';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/option';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/renderers';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './lib/export/renderers.js';
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
const { TypeScriptVersion } = require('@definitelytyped/typescript-versions');
|
||||
const {
|
||||
cleanTypeScriptInstalls,
|
||||
installAllTypeScriptVersions,
|
||||
typeScriptPath
|
||||
} = require('@definitelytyped/utils');
|
||||
const { runTsCompile } = require('./pre-publish');
|
||||
const globby = require('globby');
|
||||
const semver = require('semver');
|
||||
|
||||
const MIN_VERSION = '3.5.0';
|
||||
|
||||
async function installTs() {
|
||||
// await cleanTypeScriptInstalls();
|
||||
await installAllTypeScriptVersions();
|
||||
}
|
||||
|
||||
async function runTests() {
|
||||
const compilerOptions = {
|
||||
declaration: false,
|
||||
importHelpers: false,
|
||||
sourceMap: false,
|
||||
pretty: false,
|
||||
removeComments: false,
|
||||
allowJs: false,
|
||||
outDir: __dirname + '/../test/types/tmp',
|
||||
typeRoots: [__dirname + '/../types/dist'],
|
||||
rootDir: __dirname + '/../test/types',
|
||||
|
||||
// Must pass in most strict cases
|
||||
strict: true
|
||||
};
|
||||
const testsList = await globby(__dirname + '/../test/types/*.ts');
|
||||
|
||||
for (let version of TypeScriptVersion.shipped) {
|
||||
if (semver.lt(version + '.0', MIN_VERSION)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
console.log(`Testing ts version ${version}`);
|
||||
const ts = require(typeScriptPath(version));
|
||||
await runTsCompile(ts, compilerOptions, testsList);
|
||||
|
||||
console.log(`Finished test of ts version ${version}`);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
await installTs();
|
||||
await runTests();
|
||||
}
|
||||
|
||||
module.exports = main;
|
||||
|
||||
main();
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
const babel = require('@babel/core');
|
||||
const parser = require('@babel/parser');
|
||||
|
||||
function transformDEVPlugin ({types, template}) {
|
||||
return {
|
||||
visitor: {
|
||||
Identifier: {
|
||||
enter(path, state) {
|
||||
if (path.isIdentifier({ name: '__DEV__' }) && path.scope.hasGlobal('__DEV__')) {
|
||||
path.replaceWith(
|
||||
parser.parseExpression(state.opts.expr)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
module.exports.transform = function (sourceCode, sourcemap, expr) {
|
||||
let {code, map} = babel.transformSync(sourceCode, {
|
||||
plugins: [ [transformDEVPlugin, {
|
||||
expr: expr || 'process.env.NODE_ENV !== \'production\''
|
||||
}] ],
|
||||
compact: false,
|
||||
sourceMaps: sourcemap
|
||||
});
|
||||
|
||||
return {code, map};
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} code
|
||||
* @throws {Error} If check failed.
|
||||
*/
|
||||
module.exports.recheckDEV = function (code) {
|
||||
return code.indexOf('process.env.NODE_ENV') >= 0;
|
||||
};
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/charts';
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
// In somehow. If we export like
|
||||
// export * as LineChart './chart/line/install'
|
||||
// The exported code will be transformed to
|
||||
// import * as LineChart_1 './chart/line/install'; export {LineChart_1 as LineChart};
|
||||
// Treeshaking in webpack will not work even if we configured sideEffects to false in package.json
|
||||
|
||||
export * from './lib/export/charts.js';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/components';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './lib/export/components.js';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/core';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './lib/export/core.js';
|
||||
+62112
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+45
File diff suppressed because one or more lines are too long
+95145
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+45
File diff suppressed because one or more lines are too long
+95211
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+45
File diff suppressed because one or more lines are too long
+45240
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+45
File diff suppressed because one or more lines are too long
+413
@@ -0,0 +1,413 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'echarts'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bmap = {}, global.echarts));
|
||||
}(this, (function (exports, echarts) { 'use strict';
|
||||
|
||||
function BMapCoordSys(bmap, api) {
|
||||
this._bmap = bmap;
|
||||
this.dimensions = ['lng', 'lat'];
|
||||
this._mapOffset = [0, 0];
|
||||
this._api = api;
|
||||
this._projection = new BMap.MercatorProjection();
|
||||
}
|
||||
|
||||
BMapCoordSys.prototype.dimensions = ['lng', 'lat'];
|
||||
|
||||
BMapCoordSys.prototype.setZoom = function (zoom) {
|
||||
this._zoom = zoom;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.setCenter = function (center) {
|
||||
this._center = this._projection.lngLatToPoint(new BMap.Point(center[0], center[1]));
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.setMapOffset = function (mapOffset) {
|
||||
this._mapOffset = mapOffset;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getBMap = function () {
|
||||
return this._bmap;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.dataToPoint = function (data) {
|
||||
var point = new BMap.Point(data[0], data[1]); // TODO mercator projection is toooooooo slow
|
||||
// let mercatorPoint = this._projection.lngLatToPoint(point);
|
||||
// let width = this._api.getZr().getWidth();
|
||||
// let height = this._api.getZr().getHeight();
|
||||
// let divider = Math.pow(2, 18 - 10);
|
||||
// return [
|
||||
// Math.round((mercatorPoint.x - this._center.x) / divider + width / 2),
|
||||
// Math.round((this._center.y - mercatorPoint.y) / divider + height / 2)
|
||||
// ];
|
||||
|
||||
var px = this._bmap.pointToOverlayPixel(point);
|
||||
|
||||
var mapOffset = this._mapOffset;
|
||||
return [px.x - mapOffset[0], px.y - mapOffset[1]];
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.pointToData = function (pt) {
|
||||
var mapOffset = this._mapOffset;
|
||||
pt = this._bmap.overlayPixelToPoint({
|
||||
x: pt[0] + mapOffset[0],
|
||||
y: pt[1] + mapOffset[1]
|
||||
});
|
||||
return [pt.lng, pt.lat];
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getViewRect = function () {
|
||||
var api = this._api;
|
||||
return new echarts.graphic.BoundingRect(0, 0, api.getWidth(), api.getHeight());
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getRoamTransform = function () {
|
||||
return echarts.matrix.create();
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.prepareCustoms = function () {
|
||||
var rect = this.getViewRect();
|
||||
return {
|
||||
coordSys: {
|
||||
// The name exposed to user is always 'cartesian2d' but not 'grid'.
|
||||
type: 'bmap',
|
||||
x: rect.x,
|
||||
y: rect.y,
|
||||
width: rect.width,
|
||||
height: rect.height
|
||||
},
|
||||
api: {
|
||||
coord: echarts.util.bind(this.dataToPoint, this),
|
||||
size: echarts.util.bind(dataToCoordSize, this)
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function dataToCoordSize(dataSize, dataItem) {
|
||||
dataItem = dataItem || [0, 0];
|
||||
return echarts.util.map([0, 1], function (dimIdx) {
|
||||
var val = dataItem[dimIdx];
|
||||
var halfSize = dataSize[dimIdx] / 2;
|
||||
var p1 = [];
|
||||
var p2 = [];
|
||||
p1[dimIdx] = val - halfSize;
|
||||
p2[dimIdx] = val + halfSize;
|
||||
p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];
|
||||
return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);
|
||||
}, this);
|
||||
}
|
||||
|
||||
var Overlay; // For deciding which dimensions to use when creating list data
|
||||
|
||||
BMapCoordSys.dimensions = BMapCoordSys.prototype.dimensions;
|
||||
|
||||
function createOverlayCtor() {
|
||||
function Overlay(root) {
|
||||
this._root = root;
|
||||
}
|
||||
|
||||
Overlay.prototype = new BMap.Overlay();
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @param {BMap.Map} map
|
||||
* @override
|
||||
*/
|
||||
|
||||
Overlay.prototype.initialize = function (map) {
|
||||
map.getPanes().labelPane.appendChild(this._root);
|
||||
return this._root;
|
||||
};
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
|
||||
|
||||
Overlay.prototype.draw = function () {};
|
||||
|
||||
return Overlay;
|
||||
}
|
||||
|
||||
BMapCoordSys.create = function (ecModel, api) {
|
||||
var bmapCoordSys;
|
||||
var root = api.getDom(); // TODO Dispose
|
||||
|
||||
ecModel.eachComponent('bmap', function (bmapModel) {
|
||||
var painter = api.getZr().painter;
|
||||
var viewportRoot = painter.getViewportRoot();
|
||||
|
||||
if (typeof BMap === 'undefined') {
|
||||
throw new Error('BMap api is not loaded');
|
||||
}
|
||||
|
||||
Overlay = Overlay || createOverlayCtor();
|
||||
|
||||
if (bmapCoordSys) {
|
||||
throw new Error('Only one bmap component can exist');
|
||||
}
|
||||
|
||||
var bmap;
|
||||
|
||||
if (!bmapModel.__bmap) {
|
||||
// Not support IE8
|
||||
var bmapRoot = root.querySelector('.ec-extension-bmap');
|
||||
|
||||
if (bmapRoot) {
|
||||
// Reset viewport left and top, which will be changed
|
||||
// in moving handler in BMapView
|
||||
viewportRoot.style.left = '0px';
|
||||
viewportRoot.style.top = '0px';
|
||||
root.removeChild(bmapRoot);
|
||||
}
|
||||
|
||||
bmapRoot = document.createElement('div');
|
||||
bmapRoot.className = 'ec-extension-bmap'; // fix #13424
|
||||
|
||||
bmapRoot.style.cssText = 'position:absolute;width:100%;height:100%';
|
||||
root.appendChild(bmapRoot); // initializes bmap
|
||||
|
||||
var mapOptions = bmapModel.get('mapOptions');
|
||||
|
||||
if (mapOptions) {
|
||||
mapOptions = echarts.util.clone(mapOptions); // Not support `mapType`, use `bmap.setMapType(MapType)` instead.
|
||||
|
||||
delete mapOptions.mapType;
|
||||
}
|
||||
|
||||
bmap = bmapModel.__bmap = new BMap.Map(bmapRoot, mapOptions);
|
||||
var overlay = new Overlay(viewportRoot);
|
||||
bmap.addOverlay(overlay); // Override
|
||||
|
||||
painter.getViewportRootOffset = function () {
|
||||
return {
|
||||
offsetLeft: 0,
|
||||
offsetTop: 0
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
bmap = bmapModel.__bmap; // Set bmap options
|
||||
// centerAndZoom before layout and render
|
||||
|
||||
var center = bmapModel.get('center');
|
||||
var zoom = bmapModel.get('zoom');
|
||||
|
||||
if (center && zoom) {
|
||||
var bmapCenter = bmap.getCenter();
|
||||
var bmapZoom = bmap.getZoom();
|
||||
var centerOrZoomChanged = bmapModel.centerOrZoomChanged([bmapCenter.lng, bmapCenter.lat], bmapZoom);
|
||||
|
||||
if (centerOrZoomChanged) {
|
||||
var pt = new BMap.Point(center[0], center[1]);
|
||||
bmap.centerAndZoom(pt, zoom);
|
||||
}
|
||||
}
|
||||
|
||||
bmapCoordSys = new BMapCoordSys(bmap, api);
|
||||
bmapCoordSys.setMapOffset(bmapModel.__mapOffset || [0, 0]);
|
||||
bmapCoordSys.setZoom(zoom);
|
||||
bmapCoordSys.setCenter(center);
|
||||
bmapModel.coordinateSystem = bmapCoordSys;
|
||||
});
|
||||
ecModel.eachSeries(function (seriesModel) {
|
||||
if (seriesModel.get('coordinateSystem') === 'bmap') {
|
||||
seriesModel.coordinateSystem = bmapCoordSys;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function v2Equal(a, b) {
|
||||
return a && b && a[0] === b[0] && a[1] === b[1];
|
||||
}
|
||||
|
||||
echarts.extendComponentModel({
|
||||
type: 'bmap',
|
||||
getBMap: function () {
|
||||
// __bmap is injected when creating BMapCoordSys
|
||||
return this.__bmap;
|
||||
},
|
||||
setCenterAndZoom: function (center, zoom) {
|
||||
this.option.center = center;
|
||||
this.option.zoom = zoom;
|
||||
},
|
||||
centerOrZoomChanged: function (center, zoom) {
|
||||
var option = this.option;
|
||||
return !(v2Equal(center, option.center) && zoom === option.zoom);
|
||||
},
|
||||
defaultOption: {
|
||||
center: [104.114129, 37.550339],
|
||||
zoom: 5,
|
||||
// 2.0 http://lbsyun.baidu.com/custom/index.htm
|
||||
mapStyle: {},
|
||||
// 3.0 http://lbsyun.baidu.com/index.php?title=open/custom
|
||||
mapStyleV2: {},
|
||||
// See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
|
||||
mapOptions: {},
|
||||
roam: false
|
||||
}
|
||||
});
|
||||
|
||||
function isEmptyObject(obj) {
|
||||
for (var key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
echarts.extendComponentView({
|
||||
type: 'bmap',
|
||||
render: function (bMapModel, ecModel, api) {
|
||||
var rendering = true;
|
||||
var bmap = bMapModel.getBMap();
|
||||
var viewportRoot = api.getZr().painter.getViewportRoot();
|
||||
var coordSys = bMapModel.coordinateSystem;
|
||||
|
||||
var moveHandler = function (type, target) {
|
||||
if (rendering) {
|
||||
return;
|
||||
}
|
||||
|
||||
var offsetEl = viewportRoot.parentNode.parentNode.parentNode;
|
||||
var mapOffset = [-parseInt(offsetEl.style.left, 10) || 0, -parseInt(offsetEl.style.top, 10) || 0]; // only update style when map offset changed
|
||||
|
||||
var viewportRootStyle = viewportRoot.style;
|
||||
var offsetLeft = mapOffset[0] + 'px';
|
||||
var offsetTop = mapOffset[1] + 'px';
|
||||
|
||||
if (viewportRootStyle.left !== offsetLeft) {
|
||||
viewportRootStyle.left = offsetLeft;
|
||||
}
|
||||
|
||||
if (viewportRootStyle.top !== offsetTop) {
|
||||
viewportRootStyle.top = offsetTop;
|
||||
}
|
||||
|
||||
coordSys.setMapOffset(mapOffset);
|
||||
bMapModel.__mapOffset = mapOffset;
|
||||
api.dispatchAction({
|
||||
type: 'bmapRoam',
|
||||
animation: {
|
||||
duration: 0
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function zoomEndHandler() {
|
||||
if (rendering) {
|
||||
return;
|
||||
}
|
||||
|
||||
api.dispatchAction({
|
||||
type: 'bmapRoam',
|
||||
animation: {
|
||||
duration: 0
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bmap.removeEventListener('moving', this._oldMoveHandler);
|
||||
bmap.removeEventListener('moveend', this._oldMoveHandler);
|
||||
bmap.removeEventListener('zoomend', this._oldZoomEndHandler);
|
||||
bmap.addEventListener('moving', moveHandler);
|
||||
bmap.addEventListener('moveend', moveHandler);
|
||||
bmap.addEventListener('zoomend', zoomEndHandler);
|
||||
this._oldMoveHandler = moveHandler;
|
||||
this._oldZoomEndHandler = zoomEndHandler;
|
||||
var roam = bMapModel.get('roam');
|
||||
|
||||
if (roam && roam !== 'scale') {
|
||||
bmap.enableDragging();
|
||||
} else {
|
||||
bmap.disableDragging();
|
||||
}
|
||||
|
||||
if (roam && roam !== 'move') {
|
||||
bmap.enableScrollWheelZoom();
|
||||
bmap.enableDoubleClickZoom();
|
||||
bmap.enablePinchToZoom();
|
||||
} else {
|
||||
bmap.disableScrollWheelZoom();
|
||||
bmap.disableDoubleClickZoom();
|
||||
bmap.disablePinchToZoom();
|
||||
}
|
||||
/* map 2.0 */
|
||||
|
||||
|
||||
var originalStyle = bMapModel.__mapStyle;
|
||||
var newMapStyle = bMapModel.get('mapStyle') || {}; // FIXME, Not use JSON methods
|
||||
|
||||
var mapStyleStr = JSON.stringify(newMapStyle);
|
||||
|
||||
if (JSON.stringify(originalStyle) !== mapStyleStr) {
|
||||
// FIXME May have blank tile when dragging if setMapStyle
|
||||
if (!isEmptyObject(newMapStyle)) {
|
||||
bmap.setMapStyle(echarts.util.clone(newMapStyle));
|
||||
}
|
||||
|
||||
bMapModel.__mapStyle = JSON.parse(mapStyleStr);
|
||||
}
|
||||
/* map 3.0 */
|
||||
|
||||
|
||||
var originalStyle2 = bMapModel.__mapStyle2;
|
||||
var newMapStyle2 = bMapModel.get('mapStyleV2') || {}; // FIXME, Not use JSON methods
|
||||
|
||||
var mapStyleStr2 = JSON.stringify(newMapStyle2);
|
||||
|
||||
if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
|
||||
// FIXME May have blank tile when dragging if setMapStyle
|
||||
if (!isEmptyObject(newMapStyle2)) {
|
||||
bmap.setMapStyleV2(echarts.util.clone(newMapStyle2));
|
||||
}
|
||||
|
||||
bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
|
||||
}
|
||||
|
||||
rendering = false;
|
||||
}
|
||||
});
|
||||
|
||||
echarts.registerCoordinateSystem('bmap', BMapCoordSys); // Action
|
||||
|
||||
echarts.registerAction({
|
||||
type: 'bmapRoam',
|
||||
event: 'bmapRoam',
|
||||
update: 'updateLayout'
|
||||
}, function (payload, ecModel) {
|
||||
ecModel.eachComponent('bmap', function (bMapModel) {
|
||||
var bmap = bMapModel.getBMap();
|
||||
var center = bmap.getCenter();
|
||||
bMapModel.setCenterAndZoom([center.lng, center.lat], bmap.getZoom());
|
||||
});
|
||||
});
|
||||
var version = '1.0.0';
|
||||
|
||||
exports.version = version;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=bmap.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],t):t((e=e||self).bmap={},e.echarts)}(this,function(e,d){"use strict";function l(e,t){this._bmap=e,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=t,this._projection=new BMap.MercatorProjection}function t(a,r){return r=r||[0,0],d.util.map([0,1],function(e){var t=r[e],o=a[e]/2,n=[],i=[];return n[e]=t-o,i[e]=t+o,n[1-e]=i[1-e]=r[1-e],Math.abs(this.dataToPoint(n)[e]-this.dataToPoint(i)[e])},this)}var c;function f(e){for(var t in e)if(e.hasOwnProperty(t))return;return 1}l.prototype.dimensions=["lng","lat"],l.prototype.setZoom=function(e){this._zoom=e},l.prototype.setCenter=function(e){this._center=this._projection.lngLatToPoint(new BMap.Point(e[0],e[1]))},l.prototype.setMapOffset=function(e){this._mapOffset=e},l.prototype.getBMap=function(){return this._bmap},l.prototype.dataToPoint=function(e){var t=new BMap.Point(e[0],e[1]),e=this._bmap.pointToOverlayPixel(t),t=this._mapOffset;return[e.x-t[0],e.y-t[1]]},l.prototype.pointToData=function(e){var t=this._mapOffset;return[(e=this._bmap.overlayPixelToPoint({x:e[0]+t[0],y:e[1]+t[1]})).lng,e.lat]},l.prototype.getViewRect=function(){var e=this._api;return new d.graphic.BoundingRect(0,0,e.getWidth(),e.getHeight())},l.prototype.getRoamTransform=function(){return d.matrix.create()},l.prototype.prepareCustoms=function(){var e=this.getViewRect();return{coordSys:{type:"bmap",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:d.util.bind(this.dataToPoint,this),size:d.util.bind(t,this)}}},l.dimensions=l.prototype.dimensions,l.create=function(e,p){var s,m=p.getDom();e.eachComponent("bmap",function(e){var t,o=p.getZr().painter,n=o.getViewportRoot();if("undefined"==typeof BMap)throw new Error("BMap api is not loaded");function i(e){this._root=e}if(c=c||((i.prototype=new BMap.Overlay).initialize=function(e){return e.getPanes().labelPane.appendChild(this._root),this._root},i.prototype.draw=function(){},i),s)throw new Error("Only one bmap component can exist");e.__bmap||((a=m.querySelector(".ec-extension-bmap"))&&(n.style.left="0px",n.style.top="0px",m.removeChild(a)),(a=document.createElement("div")).className="ec-extension-bmap",a.style.cssText="position:absolute;width:100%;height:100%",m.appendChild(a),(r=e.get("mapOptions"))&&delete(r=d.util.clone(r)).mapType,t=e.__bmap=new BMap.Map(a,r),a=new c(n),t.addOverlay(a),o.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}),t=e.__bmap;var a,r=e.get("center"),n=e.get("zoom");r&&n&&(a=t.getCenter(),o=t.getZoom(),e.centerOrZoomChanged([a.lng,a.lat],o)&&(o=new BMap.Point(r[0],r[1]),t.centerAndZoom(o,n))),(s=new l(t,p)).setMapOffset(e.__mapOffset||[0,0]),s.setZoom(n),s.setCenter(r),e.coordinateSystem=s}),e.eachSeries(function(e){"bmap"===e.get("coordinateSystem")&&(e.coordinateSystem=s)})},d.extendComponentModel({type:"bmap",getBMap:function(){return this.__bmap},setCenterAndZoom:function(e,t){this.option.center=e,this.option.zoom=t},centerOrZoomChanged:function(e,t){var o,n=this.option;return o=e,e=n.center,!(o&&e&&o[0]===e[0]&&o[1]===e[1]&&t===n.zoom)},defaultOption:{center:[104.114129,37.550339],zoom:5,mapStyle:{},mapStyleV2:{},mapOptions:{},roam:!1}}),d.extendComponentView({type:"bmap",render:function(r,e,p){var s=!0,t=r.getBMap(),m=p.getZr().painter.getViewportRoot(),l=r.coordinateSystem,o=function(e,t){var o,n,i,a;s||(a=m.parentNode.parentNode.parentNode,o=[-parseInt(a.style.left,10)||0,-parseInt(a.style.top,10)||0],n=m.style,i=o[0]+"px",a=o[1]+"px",n.left!==i&&(n.left=i),n.top!==a&&(n.top=a),l.setMapOffset(o),r.__mapOffset=o,p.dispatchAction({type:"bmapRoam",animation:{duration:0}}))};function n(){s||p.dispatchAction({type:"bmapRoam",animation:{duration:0}})}t.removeEventListener("moving",this._oldMoveHandler),t.removeEventListener("moveend",this._oldMoveHandler),t.removeEventListener("zoomend",this._oldZoomEndHandler),t.addEventListener("moving",o),t.addEventListener("moveend",o),t.addEventListener("zoomend",n),this._oldMoveHandler=o,this._oldZoomEndHandler=n;var i=r.get("roam");i&&"scale"!==i?t.enableDragging():t.disableDragging(),i&&"move"!==i?(t.enableScrollWheelZoom(),t.enableDoubleClickZoom(),t.enablePinchToZoom()):(t.disableScrollWheelZoom(),t.disableDoubleClickZoom(),t.disablePinchToZoom());var a=r.__mapStyle,o=r.get("mapStyle")||{},i=JSON.stringify(o);JSON.stringify(a)!==i&&(f(o)||t.setMapStyle(d.util.clone(o)),r.__mapStyle=JSON.parse(i));a=r.__mapStyle2,o=r.get("mapStyleV2")||{},i=JSON.stringify(o);JSON.stringify(a)!==i&&(f(o)||t.setMapStyleV2(d.util.clone(o)),r.__mapStyle2=JSON.parse(i)),s=!1}}),d.registerCoordinateSystem("bmap",l),d.registerAction({type:"bmapRoam",event:"bmapRoam",update:"updateLayout"},function(e,t){t.eachComponent("bmap",function(e){var t=e.getBMap(),o=t.getCenter();e.setCenterAndZoom([o.lng,o.lat],t.getZoom())})});e.version="1.0.0",Object.defineProperty(e,"__esModule",{value:!0})});
|
||||
+436
@@ -0,0 +1,436 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'echarts'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.dataTool = {}, global.echarts));
|
||||
}(this, (function (exports, echarts) { 'use strict';
|
||||
|
||||
var BUILTIN_OBJECT = reduce([
|
||||
'Function',
|
||||
'RegExp',
|
||||
'Date',
|
||||
'Error',
|
||||
'CanvasGradient',
|
||||
'CanvasPattern',
|
||||
'Image',
|
||||
'Canvas'
|
||||
], function (obj, val) {
|
||||
obj['[object ' + val + ']'] = true;
|
||||
return obj;
|
||||
}, {});
|
||||
var TYPED_ARRAY = reduce([
|
||||
'Int8',
|
||||
'Uint8',
|
||||
'Uint8Clamped',
|
||||
'Int16',
|
||||
'Uint16',
|
||||
'Int32',
|
||||
'Uint32',
|
||||
'Float32',
|
||||
'Float64'
|
||||
], function (obj, val) {
|
||||
obj['[object ' + val + 'Array]'] = true;
|
||||
return obj;
|
||||
}, {});
|
||||
var arrayProto = Array.prototype;
|
||||
var nativeSlice = arrayProto.slice;
|
||||
var nativeMap = arrayProto.map;
|
||||
var ctorFunction = function () { }.constructor;
|
||||
var protoFunction = ctorFunction ? ctorFunction.prototype : null;
|
||||
function map(arr, cb, context) {
|
||||
if (!arr) {
|
||||
return [];
|
||||
}
|
||||
if (!cb) {
|
||||
return slice(arr);
|
||||
}
|
||||
if (arr.map && arr.map === nativeMap) {
|
||||
return arr.map(cb, context);
|
||||
}
|
||||
else {
|
||||
var result = [];
|
||||
for (var i = 0, len = arr.length; i < len; i++) {
|
||||
result.push(cb.call(context, arr[i], i, arr));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
function reduce(arr, cb, memo, context) {
|
||||
if (!(arr && cb)) {
|
||||
return;
|
||||
}
|
||||
for (var i = 0, len = arr.length; i < len; i++) {
|
||||
memo = cb.call(context, memo, arr[i], i, arr);
|
||||
}
|
||||
return memo;
|
||||
}
|
||||
function bindPolyfill(func, context) {
|
||||
var args = [];
|
||||
for (var _i = 2; _i < arguments.length; _i++) {
|
||||
args[_i - 2] = arguments[_i];
|
||||
}
|
||||
return function () {
|
||||
return func.apply(context, args.concat(nativeSlice.call(arguments)));
|
||||
};
|
||||
}
|
||||
var bind = (protoFunction && isFunction(protoFunction.bind))
|
||||
? protoFunction.call.bind(protoFunction.bind)
|
||||
: bindPolyfill;
|
||||
function isFunction(value) {
|
||||
return typeof value === 'function';
|
||||
}
|
||||
function slice(arr) {
|
||||
var args = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
args[_i - 1] = arguments[_i];
|
||||
}
|
||||
return nativeSlice.apply(arr, args);
|
||||
}
|
||||
|
||||
function parse(xml) {
|
||||
var doc;
|
||||
|
||||
if (typeof xml === 'string') {
|
||||
var parser = new DOMParser();
|
||||
doc = parser.parseFromString(xml, 'text/xml');
|
||||
} else {
|
||||
doc = xml;
|
||||
}
|
||||
|
||||
if (!doc || doc.getElementsByTagName('parsererror').length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var gexfRoot = getChildByTagName(doc, 'gexf');
|
||||
|
||||
if (!gexfRoot) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var graphRoot = getChildByTagName(gexfRoot, 'graph');
|
||||
var attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
|
||||
var attributesMap = {};
|
||||
|
||||
for (var i = 0; i < attributes.length; i++) {
|
||||
attributesMap[attributes[i].id] = attributes[i];
|
||||
}
|
||||
|
||||
return {
|
||||
nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
|
||||
links: parseEdges(getChildByTagName(graphRoot, 'edges'))
|
||||
};
|
||||
}
|
||||
|
||||
function parseAttributes(parent) {
|
||||
return parent ? map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
|
||||
return {
|
||||
id: getAttr(attribDom, 'id'),
|
||||
title: getAttr(attribDom, 'title'),
|
||||
type: getAttr(attribDom, 'type')
|
||||
};
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function parseNodes(parent, attributesMap) {
|
||||
return parent ? map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
|
||||
var id = getAttr(nodeDom, 'id');
|
||||
var label = getAttr(nodeDom, 'label');
|
||||
var node = {
|
||||
id: id,
|
||||
name: label,
|
||||
itemStyle: {
|
||||
normal: {}
|
||||
}
|
||||
};
|
||||
var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
|
||||
var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
|
||||
var vizColorDom = getChildByTagName(nodeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
|
||||
|
||||
var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
|
||||
|
||||
if (vizSizeDom) {
|
||||
node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
|
||||
}
|
||||
|
||||
if (vizPosDom) {
|
||||
node.x = parseFloat(getAttr(vizPosDom, 'x'));
|
||||
node.y = parseFloat(getAttr(vizPosDom, 'y')); // z
|
||||
}
|
||||
|
||||
if (vizColorDom) {
|
||||
node.itemStyle.normal.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
|
||||
} // if (vizShapeDom) {
|
||||
// node.shape = getAttr(vizShapeDom, 'shape');
|
||||
// }
|
||||
|
||||
|
||||
if (attvaluesDom) {
|
||||
var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
|
||||
node.attributes = {};
|
||||
|
||||
for (var j = 0; j < attvalueDomList.length; j++) {
|
||||
var attvalueDom = attvalueDomList[j];
|
||||
var attId = getAttr(attvalueDom, 'for');
|
||||
var attValue = getAttr(attvalueDom, 'value');
|
||||
var attribute = attributesMap[attId];
|
||||
|
||||
if (attribute) {
|
||||
switch (attribute.type) {
|
||||
case 'integer':
|
||||
case 'long':
|
||||
attValue = parseInt(attValue, 10);
|
||||
break;
|
||||
|
||||
case 'float':
|
||||
case 'double':
|
||||
attValue = parseFloat(attValue);
|
||||
break;
|
||||
|
||||
case 'boolean':
|
||||
attValue = attValue.toLowerCase() === 'true';
|
||||
break;
|
||||
}
|
||||
|
||||
node.attributes[attId] = attValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function parseEdges(parent) {
|
||||
return parent ? map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
|
||||
var id = getAttr(edgeDom, 'id');
|
||||
var label = getAttr(edgeDom, 'label');
|
||||
var sourceId = getAttr(edgeDom, 'source');
|
||||
var targetId = getAttr(edgeDom, 'target');
|
||||
var edge = {
|
||||
id: id,
|
||||
name: label,
|
||||
source: sourceId,
|
||||
target: targetId,
|
||||
lineStyle: {
|
||||
normal: {}
|
||||
}
|
||||
};
|
||||
var lineStyle = edge.lineStyle.normal;
|
||||
var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
|
||||
var vizColorDom = getChildByTagName(edgeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
|
||||
|
||||
if (vizThicknessDom) {
|
||||
lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
|
||||
}
|
||||
|
||||
if (vizColorDom) {
|
||||
lineStyle.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
|
||||
} // if (vizShapeDom) {
|
||||
// edge.shape = vizShapeDom.getAttribute('shape');
|
||||
// }
|
||||
|
||||
|
||||
return edge;
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function getAttr(el, attrName) {
|
||||
return el.getAttribute(attrName);
|
||||
}
|
||||
|
||||
function getChildByTagName(parent, tagName) {
|
||||
var node = parent.firstChild;
|
||||
|
||||
while (node) {
|
||||
if (node.nodeType !== 1 || node.nodeName.toLowerCase() !== tagName.toLowerCase()) {
|
||||
node = node.nextSibling;
|
||||
} else {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function getChildrenByTagName(parent, tagName) {
|
||||
var node = parent.firstChild;
|
||||
var children = [];
|
||||
|
||||
while (node) {
|
||||
if (node.nodeName.toLowerCase() === tagName.toLowerCase()) {
|
||||
children.push(node);
|
||||
}
|
||||
|
||||
node = node.nextSibling;
|
||||
}
|
||||
|
||||
return children;
|
||||
}
|
||||
|
||||
var gexf = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
parse: parse
|
||||
});
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
function asc(arr) {
|
||||
arr.sort(function (a, b) {
|
||||
return a - b;
|
||||
});
|
||||
return arr;
|
||||
}
|
||||
|
||||
function quantile(ascArr, p) {
|
||||
var H = (ascArr.length - 1) * p + 1;
|
||||
var h = Math.floor(H);
|
||||
var v = +ascArr[h - 1];
|
||||
var e = H - h;
|
||||
return e ? v + e * (ascArr[h] - v) : v;
|
||||
}
|
||||
/**
|
||||
* See:
|
||||
* <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
|
||||
* <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>
|
||||
*
|
||||
* Helper method for preparing data.
|
||||
*
|
||||
* @param {Array.<number>} rawData like
|
||||
* [
|
||||
* [12,232,443], (raw data set for the first box)
|
||||
* [3843,5545,1232], (raw data set for the second box)
|
||||
* ...
|
||||
* ]
|
||||
* @param {Object} [opt]
|
||||
*
|
||||
* @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier.
|
||||
* default 1.5, means Q1 - 1.5 * (Q3 - Q1).
|
||||
* If 'none'/0 passed, min bound will not be used.
|
||||
* @param {(number|string)} [opt.layout='horizontal']
|
||||
* Box plot layout, can be 'horizontal' or 'vertical'
|
||||
* @return {Object} {
|
||||
* boxData: Array.<Array.<number>>
|
||||
* outliers: Array.<Array.<number>>
|
||||
* axisData: Array.<string>
|
||||
* }
|
||||
*/
|
||||
|
||||
|
||||
function prepareBoxplotData (rawData, opt) {
|
||||
opt = opt || {};
|
||||
var boxData = [];
|
||||
var outliers = [];
|
||||
var axisData = [];
|
||||
var boundIQR = opt.boundIQR;
|
||||
var useExtreme = boundIQR === 'none' || boundIQR === 0;
|
||||
|
||||
for (var i = 0; i < rawData.length; i++) {
|
||||
axisData.push(i + '');
|
||||
var ascList = asc(rawData[i].slice());
|
||||
var Q1 = quantile(ascList, 0.25);
|
||||
var Q2 = quantile(ascList, 0.5);
|
||||
var Q3 = quantile(ascList, 0.75);
|
||||
var min = ascList[0];
|
||||
var max = ascList[ascList.length - 1];
|
||||
var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);
|
||||
var low = useExtreme ? min : Math.max(min, Q1 - bound);
|
||||
var high = useExtreme ? max : Math.min(max, Q3 + bound);
|
||||
boxData.push([low, Q1, Q2, Q3, high]);
|
||||
|
||||
for (var j = 0; j < ascList.length; j++) {
|
||||
var dataItem = ascList[j];
|
||||
|
||||
if (dataItem < low || dataItem > high) {
|
||||
var outlier = [i, dataItem];
|
||||
opt.layout === 'vertical' && outlier.reverse();
|
||||
outliers.push(outlier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
boxData: boxData,
|
||||
outliers: outliers,
|
||||
axisData: axisData
|
||||
};
|
||||
}
|
||||
|
||||
var version = '1.0.0';
|
||||
// For backward compatibility, where the namespace `dataTool` will
|
||||
// be mounted on `echarts` is the extension `dataTool` is imported.
|
||||
// But the old version of echarts do not have `dataTool` namespace,
|
||||
// so check it before mounting.
|
||||
|
||||
if (echarts.dataTool) {
|
||||
echarts.dataTool.version = version;
|
||||
echarts.dataTool.gexf = gexf;
|
||||
echarts.dataTool.prepareBoxplotData = prepareBoxplotData; // echarts.dataTool.boxplotTransform = boxplotTransform;
|
||||
}
|
||||
|
||||
exports.gexf = gexf;
|
||||
exports.prepareBoxplotData = prepareBoxplotData;
|
||||
exports.version = version;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=dataTool.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],t):t((e=e||self).dataTool={},e.echarts)}(this,function(e,t){"use strict";var r=Array.prototype,i=r.slice,l=r.map,o=function(){}.constructor,r=o?o.prototype:null;function a(e,t,r){if(!e)return[];if(!t)return function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return i.apply(e,t)}(e);if(e.map&&e.map===l)return e.map(t,r);for(var o=[],n=0,a=e.length;n<a;n++)o.push(t.call(r,e[n],n,e));return o}r&&"function"==typeof r.bind&&r.call.bind(r.bind);function p(e,t){return e.getAttribute(t)}function c(e,t){for(var r=e.firstChild;r;){if(1===r.nodeType&&r.nodeName.toLowerCase()===t.toLowerCase())return r;r=r.nextSibling}return null}function d(e,t){for(var r=e.firstChild,o=[];r;)r.nodeName.toLowerCase()===t.toLowerCase()&&o.push(r),r=r.nextSibling;return o}o=Object.freeze({__proto__:null,parse:function(e){if(!(t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e)||t.getElementsByTagName("parsererror").length)return null;if(!(e=c(t,"gexf")))return null;for(var f,t=c(e,"graph"),r=(e=c(t,"attributes"))?a(d(e,"attribute"),function(e){return{id:p(e,"id"),title:p(e,"title"),type:p(e,"type")}}):[],o={},n=0;n<r.length;n++)o[r[n].id]=r[n];return{nodes:(e=c(t,"nodes"),f=o,e?a(d(e,"node"),function(e){var t={id:p(e,"id"),name:p(e,"label"),itemStyle:{normal:{}}},r=c(e,"viz:size"),o=c(e,"viz:position"),n=c(e,"viz:color"),e=c(e,"attvalues");if(r&&(t.symbolSize=parseFloat(p(r,"value"))),o&&(t.x=parseFloat(p(o,"x")),t.y=parseFloat(p(o,"y"))),n&&(t.itemStyle.normal.color="rgb("+[0|p(n,"r"),0|p(n,"g"),0|p(n,"b")].join(",")+")"),e){var a=d(e,"attvalue");t.attributes={};for(var i=0;i<a.length;i++){var l=a[i],u=p(l,"for"),s=p(l,"value"),l=f[u];if(l){switch(l.type){case"integer":case"long":s=parseInt(s,10);break;case"float":case"double":s=parseFloat(s);break;case"boolean":s="true"===s.toLowerCase()}t.attributes[u]=s}}}return t}):[]),links:(t=c(t,"edges"))?a(d(t,"edge"),function(e){var t={id:p(e,"id"),name:p(e,"label"),source:p(e,"source"),target:p(e,"target"),lineStyle:{normal:{}}},r=t.lineStyle.normal,o=c(e,"viz:thickness"),e=c(e,"viz:color");return o&&(r.width=parseFloat(o.getAttribute("value"))),e&&(r.color="rgb("+[0|p(e,"r"),0|p(e,"g"),0|p(e,"b")].join(",")+")"),t}):[]}}});function y(e,t){var r=(e.length-1)*t+1,o=Math.floor(r),t=+e[o-1],r=r-o;return r?t+r*(e[o]-t):t}function n(e,t){for(var r=[],o=[],n=[],a=(t=t||{}).boundIQR,i="none"===a||0===a,l=0;l<e.length;l++){n.push(l+"");var u=((g=e[l].slice()).sort(function(e,t){return e-t}),g),s=y(u,.25),f=y(u,.5),p=y(u,.75),c=u[0],d=u[u.length-1],g=(null==a?1.5:a)*(p-s),v=i?c:Math.max(c,s-g),b=i?d:Math.min(d,p+g);r.push([v,s,f,p,b]);for(var h=0;h<u.length;h++){var m=u[h];(m<v||b<m)&&(m=[l,m],"vertical"===t.layout&&m.reverse(),o.push(m))}}return{boxData:r,outliers:o,axisData:n}}r="1.0.0";t.dataTool&&(t.dataTool.version=r,t.dataTool.gexf=o,t.dataTool.prepareBoxplotData=n),e.gexf=o,e.prepareBoxplotData=n,e.version=r,Object.defineProperty(e,"__esModule",{value:!0})});
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// @ts-nocheck
|
||||
/* global BMap */
|
||||
|
||||
import {
|
||||
util as zrUtil,
|
||||
graphic,
|
||||
matrix
|
||||
} from 'echarts';
|
||||
|
||||
function BMapCoordSys(bmap, api) {
|
||||
this._bmap = bmap;
|
||||
this.dimensions = ['lng', 'lat'];
|
||||
this._mapOffset = [0, 0];
|
||||
|
||||
this._api = api;
|
||||
|
||||
this._projection = new BMap.MercatorProjection();
|
||||
}
|
||||
|
||||
BMapCoordSys.prototype.dimensions = ['lng', 'lat'];
|
||||
|
||||
BMapCoordSys.prototype.setZoom = function (zoom) {
|
||||
this._zoom = zoom;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.setCenter = function (center) {
|
||||
this._center = this._projection.lngLatToPoint(new BMap.Point(center[0], center[1]));
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.setMapOffset = function (mapOffset) {
|
||||
this._mapOffset = mapOffset;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getBMap = function () {
|
||||
return this._bmap;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.dataToPoint = function (data) {
|
||||
const point = new BMap.Point(data[0], data[1]);
|
||||
// TODO mercator projection is toooooooo slow
|
||||
// let mercatorPoint = this._projection.lngLatToPoint(point);
|
||||
|
||||
// let width = this._api.getZr().getWidth();
|
||||
// let height = this._api.getZr().getHeight();
|
||||
// let divider = Math.pow(2, 18 - 10);
|
||||
// return [
|
||||
// Math.round((mercatorPoint.x - this._center.x) / divider + width / 2),
|
||||
// Math.round((this._center.y - mercatorPoint.y) / divider + height / 2)
|
||||
// ];
|
||||
const px = this._bmap.pointToOverlayPixel(point);
|
||||
const mapOffset = this._mapOffset;
|
||||
return [px.x - mapOffset[0], px.y - mapOffset[1]];
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.pointToData = function (pt) {
|
||||
const mapOffset = this._mapOffset;
|
||||
pt = this._bmap.overlayPixelToPoint({
|
||||
x: pt[0] + mapOffset[0],
|
||||
y: pt[1] + mapOffset[1]
|
||||
});
|
||||
return [pt.lng, pt.lat];
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getViewRect = function () {
|
||||
const api = this._api;
|
||||
return new graphic.BoundingRect(0, 0, api.getWidth(), api.getHeight());
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getRoamTransform = function () {
|
||||
return matrix.create();
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.prepareCustoms = function () {
|
||||
const rect = this.getViewRect();
|
||||
return {
|
||||
coordSys: {
|
||||
// The name exposed to user is always 'cartesian2d' but not 'grid'.
|
||||
type: 'bmap',
|
||||
x: rect.x,
|
||||
y: rect.y,
|
||||
width: rect.width,
|
||||
height: rect.height
|
||||
},
|
||||
api: {
|
||||
coord: zrUtil.bind(this.dataToPoint, this),
|
||||
size: zrUtil.bind(dataToCoordSize, this)
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function dataToCoordSize(dataSize, dataItem) {
|
||||
dataItem = dataItem || [0, 0];
|
||||
return zrUtil.map([0, 1], function (dimIdx) {
|
||||
const val = dataItem[dimIdx];
|
||||
const halfSize = dataSize[dimIdx] / 2;
|
||||
const p1 = [];
|
||||
const p2 = [];
|
||||
p1[dimIdx] = val - halfSize;
|
||||
p2[dimIdx] = val + halfSize;
|
||||
p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];
|
||||
return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);
|
||||
}, this);
|
||||
}
|
||||
|
||||
let Overlay;
|
||||
|
||||
// For deciding which dimensions to use when creating list data
|
||||
BMapCoordSys.dimensions = BMapCoordSys.prototype.dimensions;
|
||||
|
||||
function createOverlayCtor() {
|
||||
function Overlay(root) {
|
||||
this._root = root;
|
||||
}
|
||||
|
||||
Overlay.prototype = new BMap.Overlay();
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @param {BMap.Map} map
|
||||
* @override
|
||||
*/
|
||||
Overlay.prototype.initialize = function (map) {
|
||||
map.getPanes().labelPane.appendChild(this._root);
|
||||
return this._root;
|
||||
};
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
Overlay.prototype.draw = function () {};
|
||||
|
||||
return Overlay;
|
||||
}
|
||||
|
||||
BMapCoordSys.create = function (ecModel, api) {
|
||||
let bmapCoordSys;
|
||||
const root = api.getDom();
|
||||
|
||||
// TODO Dispose
|
||||
ecModel.eachComponent('bmap', function (bmapModel) {
|
||||
const painter = api.getZr().painter;
|
||||
const viewportRoot = painter.getViewportRoot();
|
||||
if (typeof BMap === 'undefined') {
|
||||
throw new Error('BMap api is not loaded');
|
||||
}
|
||||
Overlay = Overlay || createOverlayCtor();
|
||||
if (bmapCoordSys) {
|
||||
throw new Error('Only one bmap component can exist');
|
||||
}
|
||||
let bmap;
|
||||
if (!bmapModel.__bmap) {
|
||||
// Not support IE8
|
||||
let bmapRoot = root.querySelector('.ec-extension-bmap');
|
||||
if (bmapRoot) {
|
||||
// Reset viewport left and top, which will be changed
|
||||
// in moving handler in BMapView
|
||||
viewportRoot.style.left = '0px';
|
||||
viewportRoot.style.top = '0px';
|
||||
root.removeChild(bmapRoot);
|
||||
}
|
||||
bmapRoot = document.createElement('div');
|
||||
bmapRoot.className = 'ec-extension-bmap';
|
||||
// fix #13424
|
||||
bmapRoot.style.cssText = 'position:absolute;width:100%;height:100%';
|
||||
root.appendChild(bmapRoot);
|
||||
|
||||
// initializes bmap
|
||||
let mapOptions = bmapModel.get('mapOptions');
|
||||
if (mapOptions) {
|
||||
mapOptions = zrUtil.clone(mapOptions);
|
||||
// Not support `mapType`, use `bmap.setMapType(MapType)` instead.
|
||||
delete mapOptions.mapType;
|
||||
}
|
||||
|
||||
bmap = bmapModel.__bmap = new BMap.Map(bmapRoot, mapOptions);
|
||||
|
||||
const overlay = new Overlay(viewportRoot);
|
||||
bmap.addOverlay(overlay);
|
||||
|
||||
// Override
|
||||
painter.getViewportRootOffset = function () {
|
||||
return {offsetLeft: 0, offsetTop: 0};
|
||||
};
|
||||
}
|
||||
bmap = bmapModel.__bmap;
|
||||
|
||||
// Set bmap options
|
||||
// centerAndZoom before layout and render
|
||||
const center = bmapModel.get('center');
|
||||
const zoom = bmapModel.get('zoom');
|
||||
if (center && zoom) {
|
||||
const bmapCenter = bmap.getCenter();
|
||||
const bmapZoom = bmap.getZoom();
|
||||
const centerOrZoomChanged = bmapModel.centerOrZoomChanged([bmapCenter.lng, bmapCenter.lat], bmapZoom);
|
||||
if (centerOrZoomChanged) {
|
||||
const pt = new BMap.Point(center[0], center[1]);
|
||||
bmap.centerAndZoom(pt, zoom);
|
||||
}
|
||||
}
|
||||
|
||||
bmapCoordSys = new BMapCoordSys(bmap, api);
|
||||
bmapCoordSys.setMapOffset(bmapModel.__mapOffset || [0, 0]);
|
||||
bmapCoordSys.setZoom(zoom);
|
||||
bmapCoordSys.setCenter(center);
|
||||
|
||||
bmapModel.coordinateSystem = bmapCoordSys;
|
||||
});
|
||||
|
||||
ecModel.eachSeries(function (seriesModel) {
|
||||
if (seriesModel.get('coordinateSystem') === 'bmap') {
|
||||
seriesModel.coordinateSystem = bmapCoordSys;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export default BMapCoordSys;
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// @ts-nocheck
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
function v2Equal(a, b) {
|
||||
return a && b && a[0] === b[0] && a[1] === b[1];
|
||||
}
|
||||
|
||||
export default echarts.extendComponentModel({
|
||||
type: 'bmap',
|
||||
|
||||
getBMap: function () {
|
||||
// __bmap is injected when creating BMapCoordSys
|
||||
return this.__bmap;
|
||||
},
|
||||
|
||||
setCenterAndZoom: function (center, zoom) {
|
||||
this.option.center = center;
|
||||
this.option.zoom = zoom;
|
||||
},
|
||||
|
||||
centerOrZoomChanged: function (center, zoom) {
|
||||
const option = this.option;
|
||||
return !(v2Equal(center, option.center) && zoom === option.zoom);
|
||||
},
|
||||
|
||||
defaultOption: {
|
||||
|
||||
center: [104.114129, 37.550339],
|
||||
|
||||
zoom: 5,
|
||||
|
||||
// 2.0 http://lbsyun.baidu.com/custom/index.htm
|
||||
mapStyle: {},
|
||||
|
||||
// 3.0 http://lbsyun.baidu.com/index.php?title=open/custom
|
||||
mapStyleV2: {},
|
||||
|
||||
// See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
|
||||
mapOptions: {},
|
||||
|
||||
roam: false
|
||||
}
|
||||
});
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// @ts-nocheck
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
function isEmptyObject(obj) {
|
||||
for (const key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export default echarts.extendComponentView({
|
||||
type: 'bmap',
|
||||
|
||||
render: function (bMapModel, ecModel, api) {
|
||||
let rendering = true;
|
||||
|
||||
const bmap = bMapModel.getBMap();
|
||||
const viewportRoot = api.getZr().painter.getViewportRoot();
|
||||
const coordSys = bMapModel.coordinateSystem;
|
||||
const moveHandler = function (type, target) {
|
||||
if (rendering) {
|
||||
return;
|
||||
}
|
||||
const offsetEl = viewportRoot.parentNode.parentNode.parentNode;
|
||||
const mapOffset = [
|
||||
-parseInt(offsetEl.style.left, 10) || 0,
|
||||
-parseInt(offsetEl.style.top, 10) || 0
|
||||
];
|
||||
// only update style when map offset changed
|
||||
const viewportRootStyle = viewportRoot.style;
|
||||
const offsetLeft = mapOffset[0] + 'px';
|
||||
const offsetTop = mapOffset[1] + 'px';
|
||||
if (viewportRootStyle.left !== offsetLeft) {
|
||||
viewportRootStyle.left = offsetLeft;
|
||||
}
|
||||
if (viewportRootStyle.top !== offsetTop) {
|
||||
viewportRootStyle.top = offsetTop;
|
||||
}
|
||||
|
||||
coordSys.setMapOffset(mapOffset);
|
||||
bMapModel.__mapOffset = mapOffset;
|
||||
|
||||
api.dispatchAction({
|
||||
type: 'bmapRoam',
|
||||
animation: {
|
||||
duration: 0
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function zoomEndHandler() {
|
||||
if (rendering) {
|
||||
return;
|
||||
}
|
||||
api.dispatchAction({
|
||||
type: 'bmapRoam',
|
||||
animation: {
|
||||
duration: 0
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bmap.removeEventListener('moving', this._oldMoveHandler);
|
||||
bmap.removeEventListener('moveend', this._oldMoveHandler);
|
||||
bmap.removeEventListener('zoomend', this._oldZoomEndHandler);
|
||||
bmap.addEventListener('moving', moveHandler);
|
||||
bmap.addEventListener('moveend', moveHandler);
|
||||
bmap.addEventListener('zoomend', zoomEndHandler);
|
||||
|
||||
this._oldMoveHandler = moveHandler;
|
||||
this._oldZoomEndHandler = zoomEndHandler;
|
||||
|
||||
const roam = bMapModel.get('roam');
|
||||
if (roam && roam !== 'scale') {
|
||||
bmap.enableDragging();
|
||||
}
|
||||
else {
|
||||
bmap.disableDragging();
|
||||
}
|
||||
if (roam && roam !== 'move') {
|
||||
bmap.enableScrollWheelZoom();
|
||||
bmap.enableDoubleClickZoom();
|
||||
bmap.enablePinchToZoom();
|
||||
}
|
||||
else {
|
||||
bmap.disableScrollWheelZoom();
|
||||
bmap.disableDoubleClickZoom();
|
||||
bmap.disablePinchToZoom();
|
||||
}
|
||||
|
||||
/* map 2.0 */
|
||||
const originalStyle = bMapModel.__mapStyle;
|
||||
|
||||
const newMapStyle = bMapModel.get('mapStyle') || {};
|
||||
// FIXME, Not use JSON methods
|
||||
const mapStyleStr = JSON.stringify(newMapStyle);
|
||||
if (JSON.stringify(originalStyle) !== mapStyleStr) {
|
||||
// FIXME May have blank tile when dragging if setMapStyle
|
||||
if (!isEmptyObject(newMapStyle)) {
|
||||
bmap.setMapStyle(echarts.util.clone(newMapStyle));
|
||||
}
|
||||
bMapModel.__mapStyle = JSON.parse(mapStyleStr);
|
||||
}
|
||||
|
||||
/* map 3.0 */
|
||||
const originalStyle2 = bMapModel.__mapStyle2;
|
||||
|
||||
const newMapStyle2 = bMapModel.get('mapStyleV2') || {};
|
||||
// FIXME, Not use JSON methods
|
||||
const mapStyleStr2 = JSON.stringify(newMapStyle2);
|
||||
if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
|
||||
// FIXME May have blank tile when dragging if setMapStyle
|
||||
if (!isEmptyObject(newMapStyle2)) {
|
||||
bmap.setMapStyleV2(echarts.util.clone(newMapStyle2));
|
||||
}
|
||||
bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
|
||||
}
|
||||
|
||||
rendering = false;
|
||||
}
|
||||
});
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
## 百度地图扩展
|
||||
|
||||
ECharts 百度地图扩展,可以在百度地图上展现 [点图](https://echarts.apache.org/zh/option.html#series-scatter),[线图](https://echarts.apache.org/zh/option.html#series-line),[热力图](https://echarts.apache.org/zh/option.html#series-heatmap) 等可视化。
|
||||
|
||||
|
||||
### 示例
|
||||
|
||||
[全国主要城市空气质量](https://echarts.apache.org/examples/zh/editor.html?c=effectScatter-bmap)
|
||||
|
||||
[北京公交路线](https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-bus)
|
||||
|
||||
[北京公交路线特效](https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-effect)
|
||||
|
||||
[北京公交路线特效](https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-effect)
|
||||
|
||||
[杭州热门步行路线](https://echarts.apache.org/examples/zh/editor.html?c=heatmap-bmap)
|
||||
|
||||
|
||||
### 引入
|
||||
|
||||
可以直接引入打包好的扩展文件和百度地图的 jssdk
|
||||
|
||||
```html
|
||||
<!--引入百度地图的jssdk,这里需要使用你在百度地图开发者平台申请的 ak-->
|
||||
<script src="http://api.map.baidu.com/api?v=2.0&ak="></script>
|
||||
<!-- 引入 ECharts -->
|
||||
<script src="dist/echarts.min.js"></script>
|
||||
<!-- 引入百度地图扩展 -->
|
||||
<script src="dist/extension/bmap.min.js"></script>
|
||||
```
|
||||
|
||||
如果是 webpack 打包,也可以 require 引入
|
||||
|
||||
```js
|
||||
require('echarts');
|
||||
require('echarts/extension/bmap/bmap');
|
||||
```
|
||||
|
||||
插件会自动注册相应的组件。
|
||||
|
||||
### 使用
|
||||
|
||||
扩展主要提供了跟 geo 一样的坐标系和底图的绘制,因此配置方式非常简单,如下
|
||||
|
||||
```js
|
||||
option = {
|
||||
// 加载 bmap 组件
|
||||
bmap: {
|
||||
// 百度地图中心经纬度
|
||||
center: [120.13066322374, 30.240018034923],
|
||||
// 百度地图缩放
|
||||
zoom: 14,
|
||||
// 是否开启拖拽缩放,可以只设置 'scale' 或者 'move'
|
||||
roam: true,
|
||||
// 百度地图的自定义样式,见 http://developer.baidu.com/map/jsdevelop-11.htm
|
||||
mapStyle: {}
|
||||
},
|
||||
series: [{
|
||||
type: 'scatter',
|
||||
// 使用百度地图坐标系
|
||||
coordinateSystem: 'bmap',
|
||||
// 数据格式跟在 geo 坐标系上一样,每一项都是 [经度,纬度,数值大小,其它维度...]
|
||||
data: [ [120, 30, 1] ]
|
||||
}]
|
||||
}
|
||||
|
||||
// 获取百度地图实例,使用百度地图自带的控件
|
||||
var bmap = chart.getModel().getComponent('bmap').getBMap();
|
||||
bmap.addControl(new BMap.MapTypeControl());
|
||||
```
|
||||
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// @ts-nocheck
|
||||
/**
|
||||
* BMap component extension
|
||||
*/
|
||||
|
||||
import * as echarts from 'echarts';
|
||||
import BMapCoordSys from './BMapCoordSys';
|
||||
|
||||
import './BMapModel';
|
||||
import './BMapView';
|
||||
|
||||
echarts.registerCoordinateSystem('bmap', BMapCoordSys);
|
||||
|
||||
// Action
|
||||
echarts.registerAction({
|
||||
type: 'bmapRoam',
|
||||
event: 'bmapRoam',
|
||||
update: 'updateLayout'
|
||||
}, function (payload, ecModel) {
|
||||
ecModel.eachComponent('bmap', function (bMapModel) {
|
||||
const bmap = bMapModel.getBMap();
|
||||
const center = bmap.getCenter();
|
||||
bMapModel.setCenterAndZoom([center.lng, center.lat], bmap.getZoom());
|
||||
});
|
||||
});
|
||||
|
||||
export const version = '1.0.0';
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// @ts-nocheck
|
||||
/**
|
||||
* This is a parse of GEXF.
|
||||
*
|
||||
* The spec of GEXF:
|
||||
* https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf
|
||||
*/
|
||||
|
||||
import * as zrUtil from 'zrender/src/core/util';
|
||||
|
||||
export function parse(xml) {
|
||||
let doc;
|
||||
if (typeof xml === 'string') {
|
||||
const parser = new DOMParser();
|
||||
doc = parser.parseFromString(xml, 'text/xml');
|
||||
}
|
||||
else {
|
||||
doc = xml;
|
||||
}
|
||||
if (!doc || doc.getElementsByTagName('parsererror').length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const gexfRoot = getChildByTagName(doc, 'gexf');
|
||||
|
||||
if (!gexfRoot) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const graphRoot = getChildByTagName(gexfRoot, 'graph');
|
||||
|
||||
const attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
|
||||
const attributesMap = {};
|
||||
for (let i = 0; i < attributes.length; i++) {
|
||||
attributesMap[attributes[i].id] = attributes[i];
|
||||
}
|
||||
|
||||
return {
|
||||
nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
|
||||
links: parseEdges(getChildByTagName(graphRoot, 'edges'))
|
||||
};
|
||||
}
|
||||
|
||||
function parseAttributes(parent) {
|
||||
return parent ? zrUtil.map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
|
||||
return {
|
||||
id: getAttr(attribDom, 'id'),
|
||||
title: getAttr(attribDom, 'title'),
|
||||
type: getAttr(attribDom, 'type')
|
||||
};
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function parseNodes(parent, attributesMap) {
|
||||
return parent ? zrUtil.map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
|
||||
|
||||
const id = getAttr(nodeDom, 'id');
|
||||
const label = getAttr(nodeDom, 'label');
|
||||
|
||||
const node = {
|
||||
id: id,
|
||||
name: label,
|
||||
itemStyle: {
|
||||
normal: {}
|
||||
}
|
||||
};
|
||||
|
||||
const vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
|
||||
const vizPosDom = getChildByTagName(nodeDom, 'viz:position');
|
||||
const vizColorDom = getChildByTagName(nodeDom, 'viz:color');
|
||||
// let vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
|
||||
|
||||
const attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
|
||||
|
||||
if (vizSizeDom) {
|
||||
node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
|
||||
}
|
||||
if (vizPosDom) {
|
||||
node.x = parseFloat(getAttr(vizPosDom, 'x'));
|
||||
node.y = parseFloat(getAttr(vizPosDom, 'y'));
|
||||
// z
|
||||
}
|
||||
if (vizColorDom) {
|
||||
node.itemStyle.normal.color = 'rgb(' + [
|
||||
getAttr(vizColorDom, 'r') | 0,
|
||||
getAttr(vizColorDom, 'g') | 0,
|
||||
getAttr(vizColorDom, 'b') | 0
|
||||
].join(',') + ')';
|
||||
}
|
||||
// if (vizShapeDom) {
|
||||
// node.shape = getAttr(vizShapeDom, 'shape');
|
||||
// }
|
||||
if (attvaluesDom) {
|
||||
const attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
|
||||
|
||||
node.attributes = {};
|
||||
|
||||
for (let j = 0; j < attvalueDomList.length; j++) {
|
||||
const attvalueDom = attvalueDomList[j];
|
||||
const attId = getAttr(attvalueDom, 'for');
|
||||
let attValue = getAttr(attvalueDom, 'value');
|
||||
const attribute = attributesMap[attId];
|
||||
|
||||
if (attribute) {
|
||||
switch (attribute.type) {
|
||||
case 'integer':
|
||||
case 'long':
|
||||
attValue = parseInt(attValue, 10);
|
||||
break;
|
||||
case 'float':
|
||||
case 'double':
|
||||
attValue = parseFloat(attValue);
|
||||
break;
|
||||
case 'boolean':
|
||||
attValue = attValue.toLowerCase() === 'true';
|
||||
break;
|
||||
default:
|
||||
}
|
||||
node.attributes[attId] = attValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function parseEdges(parent) {
|
||||
return parent ? zrUtil.map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
|
||||
const id = getAttr(edgeDom, 'id');
|
||||
const label = getAttr(edgeDom, 'label');
|
||||
|
||||
const sourceId = getAttr(edgeDom, 'source');
|
||||
const targetId = getAttr(edgeDom, 'target');
|
||||
|
||||
const edge = {
|
||||
id: id,
|
||||
name: label,
|
||||
source: sourceId,
|
||||
target: targetId,
|
||||
lineStyle: {
|
||||
normal: {}
|
||||
}
|
||||
};
|
||||
|
||||
const lineStyle = edge.lineStyle.normal;
|
||||
|
||||
const vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
|
||||
const vizColorDom = getChildByTagName(edgeDom, 'viz:color');
|
||||
// let vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
|
||||
|
||||
if (vizThicknessDom) {
|
||||
lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
|
||||
}
|
||||
if (vizColorDom) {
|
||||
lineStyle.color = 'rgb(' + [
|
||||
getAttr(vizColorDom, 'r') | 0,
|
||||
getAttr(vizColorDom, 'g') | 0,
|
||||
getAttr(vizColorDom, 'b') | 0
|
||||
].join(',') + ')';
|
||||
}
|
||||
// if (vizShapeDom) {
|
||||
// edge.shape = vizShapeDom.getAttribute('shape');
|
||||
// }
|
||||
|
||||
return edge;
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function getAttr(el, attrName) {
|
||||
return el.getAttribute(attrName);
|
||||
}
|
||||
|
||||
function getChildByTagName(parent, tagName) {
|
||||
let node = parent.firstChild;
|
||||
|
||||
while (node) {
|
||||
if (
|
||||
node.nodeType !== 1
|
||||
|| node.nodeName.toLowerCase() !== tagName.toLowerCase()
|
||||
) {
|
||||
node = node.nextSibling;
|
||||
}
|
||||
else {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function getChildrenByTagName(parent, tagName) {
|
||||
let node = parent.firstChild;
|
||||
const children = [];
|
||||
while (node) {
|
||||
if (node.nodeName.toLowerCase() === tagName.toLowerCase()) {
|
||||
children.push(node);
|
||||
}
|
||||
node = node.nextSibling;
|
||||
}
|
||||
|
||||
return children;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// @ts-nocheck
|
||||
import * as echarts from 'echarts';
|
||||
import * as gexf from './gexf';
|
||||
import prepareBoxplotData from './prepareBoxplotData';
|
||||
// import { boxplotTransform } from './boxplotTransform';
|
||||
|
||||
export const version = '1.0.0';
|
||||
|
||||
export {gexf};
|
||||
|
||||
export {prepareBoxplotData};
|
||||
// export {boxplotTransform};
|
||||
|
||||
// For backward compatibility, where the namespace `dataTool` will
|
||||
// be mounted on `echarts` is the extension `dataTool` is imported.
|
||||
// But the old version of echarts do not have `dataTool` namespace,
|
||||
// so check it before mounting.
|
||||
if (echarts.dataTool) {
|
||||
echarts.dataTool.version = version;
|
||||
echarts.dataTool.gexf = gexf;
|
||||
echarts.dataTool.prepareBoxplotData = prepareBoxplotData;
|
||||
// echarts.dataTool.boxplotTransform = boxplotTransform;
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
function asc<T extends number[]>(arr: T): T {
|
||||
arr.sort(function (a, b) {
|
||||
return a - b;
|
||||
});
|
||||
return arr;
|
||||
}
|
||||
|
||||
function quantile(ascArr: number[], p: number): number {
|
||||
const H = (ascArr.length - 1) * p + 1;
|
||||
const h = Math.floor(H);
|
||||
const v = +ascArr[h - 1];
|
||||
const e = H - h;
|
||||
return e ? v + e * (ascArr[h] - v) : v;
|
||||
}
|
||||
/**
|
||||
* See:
|
||||
* <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
|
||||
* <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>
|
||||
*
|
||||
* Helper method for preparing data.
|
||||
*
|
||||
* @param {Array.<number>} rawData like
|
||||
* [
|
||||
* [12,232,443], (raw data set for the first box)
|
||||
* [3843,5545,1232], (raw data set for the second box)
|
||||
* ...
|
||||
* ]
|
||||
* @param {Object} [opt]
|
||||
*
|
||||
* @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier.
|
||||
* default 1.5, means Q1 - 1.5 * (Q3 - Q1).
|
||||
* If 'none'/0 passed, min bound will not be used.
|
||||
* @param {(number|string)} [opt.layout='horizontal']
|
||||
* Box plot layout, can be 'horizontal' or 'vertical'
|
||||
* @return {Object} {
|
||||
* boxData: Array.<Array.<number>>
|
||||
* outliers: Array.<Array.<number>>
|
||||
* axisData: Array.<string>
|
||||
* }
|
||||
*/
|
||||
export default function (
|
||||
rawData: number[][],
|
||||
opt: {
|
||||
boundIQR?: number | 'none',
|
||||
layout?: 'horizontal' | 'vertical'
|
||||
}
|
||||
): {
|
||||
boxData: number[][]
|
||||
outliers: number[][]
|
||||
axisData: string[]
|
||||
} {
|
||||
opt = opt || {};
|
||||
const boxData = [];
|
||||
const outliers = [];
|
||||
const axisData: string[] = [];
|
||||
const boundIQR = opt.boundIQR;
|
||||
const useExtreme = boundIQR === 'none' || boundIQR === 0;
|
||||
|
||||
for (let i = 0; i < rawData.length; i++) {
|
||||
axisData.push(i + '');
|
||||
const ascList = asc(rawData[i].slice());
|
||||
|
||||
const Q1 = quantile(ascList, 0.25);
|
||||
const Q2 = quantile(ascList, 0.5);
|
||||
const Q3 = quantile(ascList, 0.75);
|
||||
const min = ascList[0];
|
||||
const max = ascList[ascList.length - 1];
|
||||
|
||||
const bound = (boundIQR == null ? 1.5 : boundIQR as number) * (Q3 - Q1);
|
||||
|
||||
const low = useExtreme
|
||||
? min
|
||||
: Math.max(min, Q1 - bound);
|
||||
const high = useExtreme
|
||||
? max
|
||||
: Math.min(max, Q3 + bound);
|
||||
|
||||
boxData.push([low, Q1, Q2, Q3, high]);
|
||||
|
||||
for (let j = 0; j < ascList.length; j++) {
|
||||
const dataItem = ascList[j];
|
||||
if (dataItem < low || dataItem > high) {
|
||||
const outlier = [i, dataItem];
|
||||
opt.layout === 'vertical' && outlier.reverse();
|
||||
outliers.push(outlier);
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
boxData: boxData,
|
||||
outliers: outliers,
|
||||
axisData: axisData
|
||||
};
|
||||
}
|
||||
+261
@@ -0,0 +1,261 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
// @ts-nocheck
|
||||
|
||||
/* global BMap */
|
||||
import { util as zrUtil, graphic, matrix } from 'echarts';
|
||||
|
||||
function BMapCoordSys(bmap, api) {
|
||||
this._bmap = bmap;
|
||||
this.dimensions = ['lng', 'lat'];
|
||||
this._mapOffset = [0, 0];
|
||||
this._api = api;
|
||||
this._projection = new BMap.MercatorProjection();
|
||||
}
|
||||
|
||||
BMapCoordSys.prototype.dimensions = ['lng', 'lat'];
|
||||
|
||||
BMapCoordSys.prototype.setZoom = function (zoom) {
|
||||
this._zoom = zoom;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.setCenter = function (center) {
|
||||
this._center = this._projection.lngLatToPoint(new BMap.Point(center[0], center[1]));
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.setMapOffset = function (mapOffset) {
|
||||
this._mapOffset = mapOffset;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getBMap = function () {
|
||||
return this._bmap;
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.dataToPoint = function (data) {
|
||||
var point = new BMap.Point(data[0], data[1]); // TODO mercator projection is toooooooo slow
|
||||
// let mercatorPoint = this._projection.lngLatToPoint(point);
|
||||
// let width = this._api.getZr().getWidth();
|
||||
// let height = this._api.getZr().getHeight();
|
||||
// let divider = Math.pow(2, 18 - 10);
|
||||
// return [
|
||||
// Math.round((mercatorPoint.x - this._center.x) / divider + width / 2),
|
||||
// Math.round((this._center.y - mercatorPoint.y) / divider + height / 2)
|
||||
// ];
|
||||
|
||||
var px = this._bmap.pointToOverlayPixel(point);
|
||||
|
||||
var mapOffset = this._mapOffset;
|
||||
return [px.x - mapOffset[0], px.y - mapOffset[1]];
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.pointToData = function (pt) {
|
||||
var mapOffset = this._mapOffset;
|
||||
pt = this._bmap.overlayPixelToPoint({
|
||||
x: pt[0] + mapOffset[0],
|
||||
y: pt[1] + mapOffset[1]
|
||||
});
|
||||
return [pt.lng, pt.lat];
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getViewRect = function () {
|
||||
var api = this._api;
|
||||
return new graphic.BoundingRect(0, 0, api.getWidth(), api.getHeight());
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.getRoamTransform = function () {
|
||||
return matrix.create();
|
||||
};
|
||||
|
||||
BMapCoordSys.prototype.prepareCustoms = function () {
|
||||
var rect = this.getViewRect();
|
||||
return {
|
||||
coordSys: {
|
||||
// The name exposed to user is always 'cartesian2d' but not 'grid'.
|
||||
type: 'bmap',
|
||||
x: rect.x,
|
||||
y: rect.y,
|
||||
width: rect.width,
|
||||
height: rect.height
|
||||
},
|
||||
api: {
|
||||
coord: zrUtil.bind(this.dataToPoint, this),
|
||||
size: zrUtil.bind(dataToCoordSize, this)
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function dataToCoordSize(dataSize, dataItem) {
|
||||
dataItem = dataItem || [0, 0];
|
||||
return zrUtil.map([0, 1], function (dimIdx) {
|
||||
var val = dataItem[dimIdx];
|
||||
var halfSize = dataSize[dimIdx] / 2;
|
||||
var p1 = [];
|
||||
var p2 = [];
|
||||
p1[dimIdx] = val - halfSize;
|
||||
p2[dimIdx] = val + halfSize;
|
||||
p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];
|
||||
return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);
|
||||
}, this);
|
||||
}
|
||||
|
||||
var Overlay; // For deciding which dimensions to use when creating list data
|
||||
|
||||
BMapCoordSys.dimensions = BMapCoordSys.prototype.dimensions;
|
||||
|
||||
function createOverlayCtor() {
|
||||
function Overlay(root) {
|
||||
this._root = root;
|
||||
}
|
||||
|
||||
Overlay.prototype = new BMap.Overlay();
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @param {BMap.Map} map
|
||||
* @override
|
||||
*/
|
||||
|
||||
Overlay.prototype.initialize = function (map) {
|
||||
map.getPanes().labelPane.appendChild(this._root);
|
||||
return this._root;
|
||||
};
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
|
||||
|
||||
Overlay.prototype.draw = function () {};
|
||||
|
||||
return Overlay;
|
||||
}
|
||||
|
||||
BMapCoordSys.create = function (ecModel, api) {
|
||||
var bmapCoordSys;
|
||||
var root = api.getDom(); // TODO Dispose
|
||||
|
||||
ecModel.eachComponent('bmap', function (bmapModel) {
|
||||
var painter = api.getZr().painter;
|
||||
var viewportRoot = painter.getViewportRoot();
|
||||
|
||||
if (typeof BMap === 'undefined') {
|
||||
throw new Error('BMap api is not loaded');
|
||||
}
|
||||
|
||||
Overlay = Overlay || createOverlayCtor();
|
||||
|
||||
if (bmapCoordSys) {
|
||||
throw new Error('Only one bmap component can exist');
|
||||
}
|
||||
|
||||
var bmap;
|
||||
|
||||
if (!bmapModel.__bmap) {
|
||||
// Not support IE8
|
||||
var bmapRoot = root.querySelector('.ec-extension-bmap');
|
||||
|
||||
if (bmapRoot) {
|
||||
// Reset viewport left and top, which will be changed
|
||||
// in moving handler in BMapView
|
||||
viewportRoot.style.left = '0px';
|
||||
viewportRoot.style.top = '0px';
|
||||
root.removeChild(bmapRoot);
|
||||
}
|
||||
|
||||
bmapRoot = document.createElement('div');
|
||||
bmapRoot.className = 'ec-extension-bmap'; // fix #13424
|
||||
|
||||
bmapRoot.style.cssText = 'position:absolute;width:100%;height:100%';
|
||||
root.appendChild(bmapRoot); // initializes bmap
|
||||
|
||||
var mapOptions = bmapModel.get('mapOptions');
|
||||
|
||||
if (mapOptions) {
|
||||
mapOptions = zrUtil.clone(mapOptions); // Not support `mapType`, use `bmap.setMapType(MapType)` instead.
|
||||
|
||||
delete mapOptions.mapType;
|
||||
}
|
||||
|
||||
bmap = bmapModel.__bmap = new BMap.Map(bmapRoot, mapOptions);
|
||||
var overlay = new Overlay(viewportRoot);
|
||||
bmap.addOverlay(overlay); // Override
|
||||
|
||||
painter.getViewportRootOffset = function () {
|
||||
return {
|
||||
offsetLeft: 0,
|
||||
offsetTop: 0
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
bmap = bmapModel.__bmap; // Set bmap options
|
||||
// centerAndZoom before layout and render
|
||||
|
||||
var center = bmapModel.get('center');
|
||||
var zoom = bmapModel.get('zoom');
|
||||
|
||||
if (center && zoom) {
|
||||
var bmapCenter = bmap.getCenter();
|
||||
var bmapZoom = bmap.getZoom();
|
||||
var centerOrZoomChanged = bmapModel.centerOrZoomChanged([bmapCenter.lng, bmapCenter.lat], bmapZoom);
|
||||
|
||||
if (centerOrZoomChanged) {
|
||||
var pt = new BMap.Point(center[0], center[1]);
|
||||
bmap.centerAndZoom(pt, zoom);
|
||||
}
|
||||
}
|
||||
|
||||
bmapCoordSys = new BMapCoordSys(bmap, api);
|
||||
bmapCoordSys.setMapOffset(bmapModel.__mapOffset || [0, 0]);
|
||||
bmapCoordSys.setZoom(zoom);
|
||||
bmapCoordSys.setCenter(center);
|
||||
bmapModel.coordinateSystem = bmapCoordSys;
|
||||
});
|
||||
ecModel.eachSeries(function (seriesModel) {
|
||||
if (seriesModel.get('coordinateSystem') === 'bmap') {
|
||||
seriesModel.coordinateSystem = bmapCoordSys;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export default BMapCoordSys;
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
// @ts-nocheck
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
function v2Equal(a, b) {
|
||||
return a && b && a[0] === b[0] && a[1] === b[1];
|
||||
}
|
||||
|
||||
export default echarts.extendComponentModel({
|
||||
type: 'bmap',
|
||||
getBMap: function () {
|
||||
// __bmap is injected when creating BMapCoordSys
|
||||
return this.__bmap;
|
||||
},
|
||||
setCenterAndZoom: function (center, zoom) {
|
||||
this.option.center = center;
|
||||
this.option.zoom = zoom;
|
||||
},
|
||||
centerOrZoomChanged: function (center, zoom) {
|
||||
var option = this.option;
|
||||
return !(v2Equal(center, option.center) && zoom === option.zoom);
|
||||
},
|
||||
defaultOption: {
|
||||
center: [104.114129, 37.550339],
|
||||
zoom: 5,
|
||||
// 2.0 http://lbsyun.baidu.com/custom/index.htm
|
||||
mapStyle: {},
|
||||
// 3.0 http://lbsyun.baidu.com/index.php?title=open/custom
|
||||
mapStyleV2: {},
|
||||
// See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
|
||||
mapOptions: {},
|
||||
roam: false
|
||||
}
|
||||
});
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
// @ts-nocheck
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
function isEmptyObject(obj) {
|
||||
for (var key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
export default echarts.extendComponentView({
|
||||
type: 'bmap',
|
||||
render: function (bMapModel, ecModel, api) {
|
||||
var rendering = true;
|
||||
var bmap = bMapModel.getBMap();
|
||||
var viewportRoot = api.getZr().painter.getViewportRoot();
|
||||
var coordSys = bMapModel.coordinateSystem;
|
||||
|
||||
var moveHandler = function (type, target) {
|
||||
if (rendering) {
|
||||
return;
|
||||
}
|
||||
|
||||
var offsetEl = viewportRoot.parentNode.parentNode.parentNode;
|
||||
var mapOffset = [-parseInt(offsetEl.style.left, 10) || 0, -parseInt(offsetEl.style.top, 10) || 0]; // only update style when map offset changed
|
||||
|
||||
var viewportRootStyle = viewportRoot.style;
|
||||
var offsetLeft = mapOffset[0] + 'px';
|
||||
var offsetTop = mapOffset[1] + 'px';
|
||||
|
||||
if (viewportRootStyle.left !== offsetLeft) {
|
||||
viewportRootStyle.left = offsetLeft;
|
||||
}
|
||||
|
||||
if (viewportRootStyle.top !== offsetTop) {
|
||||
viewportRootStyle.top = offsetTop;
|
||||
}
|
||||
|
||||
coordSys.setMapOffset(mapOffset);
|
||||
bMapModel.__mapOffset = mapOffset;
|
||||
api.dispatchAction({
|
||||
type: 'bmapRoam',
|
||||
animation: {
|
||||
duration: 0
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function zoomEndHandler() {
|
||||
if (rendering) {
|
||||
return;
|
||||
}
|
||||
|
||||
api.dispatchAction({
|
||||
type: 'bmapRoam',
|
||||
animation: {
|
||||
duration: 0
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bmap.removeEventListener('moving', this._oldMoveHandler);
|
||||
bmap.removeEventListener('moveend', this._oldMoveHandler);
|
||||
bmap.removeEventListener('zoomend', this._oldZoomEndHandler);
|
||||
bmap.addEventListener('moving', moveHandler);
|
||||
bmap.addEventListener('moveend', moveHandler);
|
||||
bmap.addEventListener('zoomend', zoomEndHandler);
|
||||
this._oldMoveHandler = moveHandler;
|
||||
this._oldZoomEndHandler = zoomEndHandler;
|
||||
var roam = bMapModel.get('roam');
|
||||
|
||||
if (roam && roam !== 'scale') {
|
||||
bmap.enableDragging();
|
||||
} else {
|
||||
bmap.disableDragging();
|
||||
}
|
||||
|
||||
if (roam && roam !== 'move') {
|
||||
bmap.enableScrollWheelZoom();
|
||||
bmap.enableDoubleClickZoom();
|
||||
bmap.enablePinchToZoom();
|
||||
} else {
|
||||
bmap.disableScrollWheelZoom();
|
||||
bmap.disableDoubleClickZoom();
|
||||
bmap.disablePinchToZoom();
|
||||
}
|
||||
/* map 2.0 */
|
||||
|
||||
|
||||
var originalStyle = bMapModel.__mapStyle;
|
||||
var newMapStyle = bMapModel.get('mapStyle') || {}; // FIXME, Not use JSON methods
|
||||
|
||||
var mapStyleStr = JSON.stringify(newMapStyle);
|
||||
|
||||
if (JSON.stringify(originalStyle) !== mapStyleStr) {
|
||||
// FIXME May have blank tile when dragging if setMapStyle
|
||||
if (!isEmptyObject(newMapStyle)) {
|
||||
bmap.setMapStyle(echarts.util.clone(newMapStyle));
|
||||
}
|
||||
|
||||
bMapModel.__mapStyle = JSON.parse(mapStyleStr);
|
||||
}
|
||||
/* map 3.0 */
|
||||
|
||||
|
||||
var originalStyle2 = bMapModel.__mapStyle2;
|
||||
var newMapStyle2 = bMapModel.get('mapStyleV2') || {}; // FIXME, Not use JSON methods
|
||||
|
||||
var mapStyleStr2 = JSON.stringify(newMapStyle2);
|
||||
|
||||
if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
|
||||
// FIXME May have blank tile when dragging if setMapStyle
|
||||
if (!isEmptyObject(newMapStyle2)) {
|
||||
bmap.setMapStyleV2(echarts.util.clone(newMapStyle2));
|
||||
}
|
||||
|
||||
bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
|
||||
}
|
||||
|
||||
rendering = false;
|
||||
}
|
||||
});
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
// @ts-nocheck
|
||||
|
||||
/**
|
||||
* BMap component extension
|
||||
*/
|
||||
import * as echarts from 'echarts';
|
||||
import BMapCoordSys from './BMapCoordSys.js';
|
||||
import './BMapModel.js';
|
||||
import './BMapView.js';
|
||||
echarts.registerCoordinateSystem('bmap', BMapCoordSys); // Action
|
||||
|
||||
echarts.registerAction({
|
||||
type: 'bmapRoam',
|
||||
event: 'bmapRoam',
|
||||
update: 'updateLayout'
|
||||
}, function (payload, ecModel) {
|
||||
ecModel.eachComponent('bmap', function (bMapModel) {
|
||||
var bmap = bMapModel.getBMap();
|
||||
var center = bmap.getCenter();
|
||||
bMapModel.setCenterAndZoom([center.lng, center.lat], bmap.getZoom());
|
||||
});
|
||||
});
|
||||
export var version = '1.0.0';
|
||||
+233
@@ -0,0 +1,233 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
// @ts-nocheck
|
||||
|
||||
/**
|
||||
* This is a parse of GEXF.
|
||||
*
|
||||
* The spec of GEXF:
|
||||
* https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf
|
||||
*/
|
||||
import * as zrUtil from 'zrender/lib/core/util.js';
|
||||
export function parse(xml) {
|
||||
var doc;
|
||||
|
||||
if (typeof xml === 'string') {
|
||||
var parser = new DOMParser();
|
||||
doc = parser.parseFromString(xml, 'text/xml');
|
||||
} else {
|
||||
doc = xml;
|
||||
}
|
||||
|
||||
if (!doc || doc.getElementsByTagName('parsererror').length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var gexfRoot = getChildByTagName(doc, 'gexf');
|
||||
|
||||
if (!gexfRoot) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var graphRoot = getChildByTagName(gexfRoot, 'graph');
|
||||
var attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
|
||||
var attributesMap = {};
|
||||
|
||||
for (var i = 0; i < attributes.length; i++) {
|
||||
attributesMap[attributes[i].id] = attributes[i];
|
||||
}
|
||||
|
||||
return {
|
||||
nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
|
||||
links: parseEdges(getChildByTagName(graphRoot, 'edges'))
|
||||
};
|
||||
}
|
||||
|
||||
function parseAttributes(parent) {
|
||||
return parent ? zrUtil.map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
|
||||
return {
|
||||
id: getAttr(attribDom, 'id'),
|
||||
title: getAttr(attribDom, 'title'),
|
||||
type: getAttr(attribDom, 'type')
|
||||
};
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function parseNodes(parent, attributesMap) {
|
||||
return parent ? zrUtil.map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
|
||||
var id = getAttr(nodeDom, 'id');
|
||||
var label = getAttr(nodeDom, 'label');
|
||||
var node = {
|
||||
id: id,
|
||||
name: label,
|
||||
itemStyle: {
|
||||
normal: {}
|
||||
}
|
||||
};
|
||||
var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
|
||||
var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
|
||||
var vizColorDom = getChildByTagName(nodeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
|
||||
|
||||
var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
|
||||
|
||||
if (vizSizeDom) {
|
||||
node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
|
||||
}
|
||||
|
||||
if (vizPosDom) {
|
||||
node.x = parseFloat(getAttr(vizPosDom, 'x'));
|
||||
node.y = parseFloat(getAttr(vizPosDom, 'y')); // z
|
||||
}
|
||||
|
||||
if (vizColorDom) {
|
||||
node.itemStyle.normal.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
|
||||
} // if (vizShapeDom) {
|
||||
// node.shape = getAttr(vizShapeDom, 'shape');
|
||||
// }
|
||||
|
||||
|
||||
if (attvaluesDom) {
|
||||
var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
|
||||
node.attributes = {};
|
||||
|
||||
for (var j = 0; j < attvalueDomList.length; j++) {
|
||||
var attvalueDom = attvalueDomList[j];
|
||||
var attId = getAttr(attvalueDom, 'for');
|
||||
var attValue = getAttr(attvalueDom, 'value');
|
||||
var attribute = attributesMap[attId];
|
||||
|
||||
if (attribute) {
|
||||
switch (attribute.type) {
|
||||
case 'integer':
|
||||
case 'long':
|
||||
attValue = parseInt(attValue, 10);
|
||||
break;
|
||||
|
||||
case 'float':
|
||||
case 'double':
|
||||
attValue = parseFloat(attValue);
|
||||
break;
|
||||
|
||||
case 'boolean':
|
||||
attValue = attValue.toLowerCase() === 'true';
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
|
||||
node.attributes[attId] = attValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function parseEdges(parent) {
|
||||
return parent ? zrUtil.map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
|
||||
var id = getAttr(edgeDom, 'id');
|
||||
var label = getAttr(edgeDom, 'label');
|
||||
var sourceId = getAttr(edgeDom, 'source');
|
||||
var targetId = getAttr(edgeDom, 'target');
|
||||
var edge = {
|
||||
id: id,
|
||||
name: label,
|
||||
source: sourceId,
|
||||
target: targetId,
|
||||
lineStyle: {
|
||||
normal: {}
|
||||
}
|
||||
};
|
||||
var lineStyle = edge.lineStyle.normal;
|
||||
var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
|
||||
var vizColorDom = getChildByTagName(edgeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
|
||||
|
||||
if (vizThicknessDom) {
|
||||
lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
|
||||
}
|
||||
|
||||
if (vizColorDom) {
|
||||
lineStyle.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
|
||||
} // if (vizShapeDom) {
|
||||
// edge.shape = vizShapeDom.getAttribute('shape');
|
||||
// }
|
||||
|
||||
|
||||
return edge;
|
||||
}) : [];
|
||||
}
|
||||
|
||||
function getAttr(el, attrName) {
|
||||
return el.getAttribute(attrName);
|
||||
}
|
||||
|
||||
function getChildByTagName(parent, tagName) {
|
||||
var node = parent.firstChild;
|
||||
|
||||
while (node) {
|
||||
if (node.nodeType !== 1 || node.nodeName.toLowerCase() !== tagName.toLowerCase()) {
|
||||
node = node.nextSibling;
|
||||
} else {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function getChildrenByTagName(parent, tagName) {
|
||||
var node = parent.firstChild;
|
||||
var children = [];
|
||||
|
||||
while (node) {
|
||||
if (node.nodeName.toLowerCase() === tagName.toLowerCase()) {
|
||||
children.push(node);
|
||||
}
|
||||
|
||||
node = node.nextSibling;
|
||||
}
|
||||
|
||||
return children;
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
// @ts-nocheck
|
||||
import * as echarts from 'echarts';
|
||||
import * as gexf from './gexf.js';
|
||||
import prepareBoxplotData from './prepareBoxplotData.js'; // import { boxplotTransform } from './boxplotTransform.js';
|
||||
|
||||
export var version = '1.0.0';
|
||||
export { gexf };
|
||||
export { prepareBoxplotData }; // export {boxplotTransform};
|
||||
// For backward compatibility, where the namespace `dataTool` will
|
||||
// be mounted on `echarts` is the extension `dataTool` is imported.
|
||||
// But the old version of echarts do not have `dataTool` namespace,
|
||||
// so check it before mounting.
|
||||
|
||||
if (echarts.dataTool) {
|
||||
echarts.dataTool.version = version;
|
||||
echarts.dataTool.gexf = gexf;
|
||||
echarts.dataTool.prepareBoxplotData = prepareBoxplotData; // echarts.dataTool.boxplotTransform = boxplotTransform;
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
function asc(arr) {
|
||||
arr.sort(function (a, b) {
|
||||
return a - b;
|
||||
});
|
||||
return arr;
|
||||
}
|
||||
|
||||
function quantile(ascArr, p) {
|
||||
var H = (ascArr.length - 1) * p + 1;
|
||||
var h = Math.floor(H);
|
||||
var v = +ascArr[h - 1];
|
||||
var e = H - h;
|
||||
return e ? v + e * (ascArr[h] - v) : v;
|
||||
}
|
||||
/**
|
||||
* See:
|
||||
* <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
|
||||
* <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>
|
||||
*
|
||||
* Helper method for preparing data.
|
||||
*
|
||||
* @param {Array.<number>} rawData like
|
||||
* [
|
||||
* [12,232,443], (raw data set for the first box)
|
||||
* [3843,5545,1232], (raw data set for the second box)
|
||||
* ...
|
||||
* ]
|
||||
* @param {Object} [opt]
|
||||
*
|
||||
* @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier.
|
||||
* default 1.5, means Q1 - 1.5 * (Q3 - Q1).
|
||||
* If 'none'/0 passed, min bound will not be used.
|
||||
* @param {(number|string)} [opt.layout='horizontal']
|
||||
* Box plot layout, can be 'horizontal' or 'vertical'
|
||||
* @return {Object} {
|
||||
* boxData: Array.<Array.<number>>
|
||||
* outliers: Array.<Array.<number>>
|
||||
* axisData: Array.<string>
|
||||
* }
|
||||
*/
|
||||
|
||||
|
||||
export default function (rawData, opt) {
|
||||
opt = opt || {};
|
||||
var boxData = [];
|
||||
var outliers = [];
|
||||
var axisData = [];
|
||||
var boundIQR = opt.boundIQR;
|
||||
var useExtreme = boundIQR === 'none' || boundIQR === 0;
|
||||
|
||||
for (var i = 0; i < rawData.length; i++) {
|
||||
axisData.push(i + '');
|
||||
var ascList = asc(rawData[i].slice());
|
||||
var Q1 = quantile(ascList, 0.25);
|
||||
var Q2 = quantile(ascList, 0.5);
|
||||
var Q3 = quantile(ascList, 0.75);
|
||||
var min = ascList[0];
|
||||
var max = ascList[ascList.length - 1];
|
||||
var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);
|
||||
var low = useExtreme ? min : Math.max(min, Q1 - bound);
|
||||
var high = useExtreme ? max : Math.min(max, Q3 + bound);
|
||||
boxData.push([low, Q1, Q2, Q3, high]);
|
||||
|
||||
for (var j = 0; j < ascList.length; j++) {
|
||||
var dataItem = ascList[j];
|
||||
|
||||
if (dataItem < low || dataItem > high) {
|
||||
var outlier = [i, dataItem];
|
||||
opt.layout === 'vertical' && outlier.reverse();
|
||||
outliers.push(outlier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
boxData: boxData,
|
||||
outliers: outliers,
|
||||
axisData: axisData
|
||||
};
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './types/dist/features';
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export * from './lib/export/features.js';
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Czech.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen',
|
||||
'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Led', 'Úno', 'Bře', 'Dub', 'Kvě', 'Čvn',
|
||||
'Čvc', 'Srp', 'Zář', 'Říj', 'Lis', 'Pro'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Vše',
|
||||
inverse: 'Inv'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Obdélníkový výběr',
|
||||
polygon: 'Lasso výběr',
|
||||
lineX: 'Horizontální výběr',
|
||||
lineY: 'Vertikální výběr',
|
||||
keep: 'Ponechat výběr',
|
||||
clear: 'Zrušit výběr'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Data',
|
||||
lang: ['Data', 'Zavřít', 'Obnovit']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Přiblížit',
|
||||
back: 'Oddálit'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Změnit na Spojnicový graf',
|
||||
bar: 'Změnit na Sloupcový graf',
|
||||
stack: 'Plošný',
|
||||
tiled: 'Tile'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Obnovit'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Uložit jako obrázek',
|
||||
lang: ['Obrázek uložte pravým kliknutím']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Výsečový graf',
|
||||
bar: 'Sloupcový graf',
|
||||
line: 'Spojnicový graf',
|
||||
scatter: 'XY bodový graf',
|
||||
effectScatter: 'Effect XY bodový graf',
|
||||
radar: 'Paprskový graf',
|
||||
tree: 'Strom',
|
||||
treemap: 'Stromová mapa',
|
||||
boxplot: 'Krabicový graf',
|
||||
candlestick: 'Burzovní graf',
|
||||
k: 'K spojnicový graf',
|
||||
heatmap: 'Teplotní mapa',
|
||||
map: 'Mapa',
|
||||
parallel: 'Rovnoběžné souřadnice',
|
||||
lines: 'Spojnicový graf',
|
||||
graph: 'Graf vztahů',
|
||||
sankey: 'Sankeyův diagram',
|
||||
funnel: 'Trychtýř (Funnel)',
|
||||
gauge: 'Indikátor',
|
||||
pictorialBar: 'Obrázkový sloupcový graf',
|
||||
themeRiver: 'Theme River Map',
|
||||
sunburst: 'Vícevrstvý prstencový graf'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Toto je graf o "{title}"',
|
||||
withoutTitle: 'Toto je graf'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: '{seriesName} s typem {seriesType}.',
|
||||
withoutName: ' s typem {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Obsahuje {seriesCount} řad.',
|
||||
withName: ' Řada {seriesId} je typu {seriesType} repreyentující {seriesName}.',
|
||||
withoutName: ' Řada {seriesId} je typu {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Všechna data jsou: ',
|
||||
partialData: 'První {displayCnt} položky jsou: ',
|
||||
withName: 'data pro {name} jsou {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Czech.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen',
|
||||
'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Led', 'Úno', 'Bře', 'Dub', 'Kvě', 'Čvn',
|
||||
'Čvc', 'Srp', 'Zář', 'Říj', 'Lis', 'Pro'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Vše',
|
||||
inverse: 'Inv'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Obdélníkový výběr',
|
||||
polygon: 'Lasso výběr',
|
||||
lineX: 'Horizontální výběr',
|
||||
lineY: 'Vertikální výběr',
|
||||
keep: 'Ponechat výběr',
|
||||
clear: 'Zrušit výběr'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Data',
|
||||
lang: ['Data', 'Zavřít', 'Obnovit']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Přiblížit',
|
||||
back: 'Oddálit'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Změnit na Spojnicový graf',
|
||||
bar: 'Změnit na Sloupcový graf',
|
||||
stack: 'Plošný',
|
||||
tiled: 'Tile'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Obnovit'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Uložit jako obrázek',
|
||||
lang: ['Obrázek uložte pravým kliknutím']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Výsečový graf',
|
||||
bar: 'Sloupcový graf',
|
||||
line: 'Spojnicový graf',
|
||||
scatter: 'XY bodový graf',
|
||||
effectScatter: 'Effect XY bodový graf',
|
||||
radar: 'Paprskový graf',
|
||||
tree: 'Strom',
|
||||
treemap: 'Stromová mapa',
|
||||
boxplot: 'Krabicový graf',
|
||||
candlestick: 'Burzovní graf',
|
||||
k: 'K spojnicový graf',
|
||||
heatmap: 'Teplotní mapa',
|
||||
map: 'Mapa',
|
||||
parallel: 'Rovnoběžné souřadnice',
|
||||
lines: 'Spojnicový graf',
|
||||
graph: 'Graf vztahů',
|
||||
sankey: 'Sankeyův diagram',
|
||||
funnel: 'Trychtýř (Funnel)',
|
||||
gauge: 'Indikátor',
|
||||
pictorialBar: 'Obrázkový sloupcový graf',
|
||||
themeRiver: 'Theme River Map',
|
||||
sunburst: 'Vícevrstvý prstencový graf'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Toto je graf o "{title}"',
|
||||
withoutTitle: 'Toto je graf'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: '{seriesName} s typem {seriesType}.',
|
||||
withoutName: ' s typem {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Obsahuje {seriesCount} řad.',
|
||||
withName: ' Řada {seriesId} je typu {seriesType} repreyentující {seriesName}.',
|
||||
withoutName: ' Řada {seriesId} je typu {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Všechna data jsou: ',
|
||||
partialData: 'První {displayCnt} položky jsou: ',
|
||||
withName: 'data pro {name} jsou {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
echarts.registerLocale('CS', localeObj);
|
||||
|
||||
});
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: German.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni',
|
||||
'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Alle',
|
||||
inverse: 'Invertiert'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Box Auswahl',
|
||||
polygon: 'Lasso Auswahl',
|
||||
lineX: 'Horizontale Auswahl',
|
||||
lineY: 'Vertikale Auswahl',
|
||||
keep: 'Bereich Auswahl',
|
||||
clear: 'Auswahl zurücksetzen'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Daten Ansicht',
|
||||
lang: ['Daten Ansicht', 'Schließen', 'Aktualisieren']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Zoom zurücksetzen'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Zu Liniendiagramm wechseln',
|
||||
bar: 'Zu Balkendiagramm wechseln',
|
||||
stack: 'Stapel',
|
||||
tiled: 'Kachel'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Wiederherstellen'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Als Bild speichern',
|
||||
lang: ['Rechtsklick zum Speichern des Bildes']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Tortendiagramm',
|
||||
bar: 'Balkendiagramm',
|
||||
line: 'Liniendiagramm',
|
||||
scatter: 'Streudiagramm',
|
||||
effectScatter: 'Welligkeits-Streudiagramm',
|
||||
radar: 'Radar-Karte',
|
||||
tree: 'Baum',
|
||||
treemap: 'Baumkarte',
|
||||
boxplot: 'Boxplot',
|
||||
candlestick: 'Kerzenständer',
|
||||
k: 'K Liniendiagramm',
|
||||
heatmap: 'Heatmap',
|
||||
map: 'Karte',
|
||||
parallel: 'Parallele Koordinatenkarte',
|
||||
lines: 'Liniendiagramm',
|
||||
graph: 'Beziehungsgrafik',
|
||||
sankey: 'Sankey-Diagramm',
|
||||
funnel: 'Trichterdiagramm',
|
||||
gauge: 'Meßanzeige',
|
||||
pictorialBar: 'Bildlicher Balken',
|
||||
themeRiver: 'Thematische Flusskarte',
|
||||
sunburst: 'Sonnenausbruch'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Dies ist ein Diagramm über "{title}"',
|
||||
withoutTitle: 'Dies ist ein Diagramm'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' mit Typ {seriesType} namens {seriesName}.',
|
||||
withoutName: ' mit Typ {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Es besteht aus {seriesCount} Serienzählung.',
|
||||
withName: ' Die Serie {seriesId} ist ein {seriesType} welcher {seriesName} darstellt.',
|
||||
withoutName: ' Die {seriesId}-Reihe ist ein {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Die Daten sind wie folgt: ',
|
||||
partialData: 'Die ersten {displayCnt} Elemente sind: ',
|
||||
withName: 'die Daten für {name} sind {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ',',
|
||||
end: '.'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: German.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni',
|
||||
'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Alle',
|
||||
inverse: 'Invertiert'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Box Auswahl',
|
||||
polygon: 'Lasso Auswahl',
|
||||
lineX: 'Horizontale Auswahl',
|
||||
lineY: 'Vertikale Auswahl',
|
||||
keep: 'Bereich Auswahl',
|
||||
clear: 'Auswahl zurücksetzen'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Daten Ansicht',
|
||||
lang: ['Daten Ansicht', 'Schließen', 'Aktualisieren']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Zoom zurücksetzen'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Zu Liniendiagramm wechseln',
|
||||
bar: 'Zu Balkendiagramm wechseln',
|
||||
stack: 'Stapel',
|
||||
tiled: 'Kachel'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Wiederherstellen'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Als Bild speichern',
|
||||
lang: ['Rechtsklick zum Speichern des Bildes']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Tortendiagramm',
|
||||
bar: 'Balkendiagramm',
|
||||
line: 'Liniendiagramm',
|
||||
scatter: 'Streudiagramm',
|
||||
effectScatter: 'Welligkeits-Streudiagramm',
|
||||
radar: 'Radar-Karte',
|
||||
tree: 'Baum',
|
||||
treemap: 'Baumkarte',
|
||||
boxplot: 'Boxplot',
|
||||
candlestick: 'Kerzenständer',
|
||||
k: 'K Liniendiagramm',
|
||||
heatmap: 'Heatmap',
|
||||
map: 'Karte',
|
||||
parallel: 'Parallele Koordinatenkarte',
|
||||
lines: 'Liniendiagramm',
|
||||
graph: 'Beziehungsgrafik',
|
||||
sankey: 'Sankey-Diagramm',
|
||||
funnel: 'Trichterdiagramm',
|
||||
gauge: 'Meßanzeige',
|
||||
pictorialBar: 'Bildlicher Balken',
|
||||
themeRiver: 'Thematische Flusskarte',
|
||||
sunburst: 'Sonnenausbruch'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Dies ist ein Diagramm über "{title}"',
|
||||
withoutTitle: 'Dies ist ein Diagramm'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' mit Typ {seriesType} namens {seriesName}.',
|
||||
withoutName: ' mit Typ {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Es besteht aus {seriesCount} Serienzählung.',
|
||||
withName: ' Die Serie {seriesId} ist ein {seriesType} welcher {seriesName} darstellt.',
|
||||
withoutName: ' Die {seriesId}-Reihe ist ein {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Die Daten sind wie folgt: ',
|
||||
partialData: 'Die ersten {displayCnt} Elemente sind: ',
|
||||
withName: 'die Daten für {name} sind {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ',',
|
||||
end: '.'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
echarts.registerLocale('DE', localeObj);
|
||||
|
||||
});
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: English.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'January', 'February', 'March', 'April', 'May', 'June',
|
||||
'July', 'August', 'September', 'October', 'November', 'December'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'All',
|
||||
inverse: 'Inv'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Box Select',
|
||||
polygon: 'Lasso Select',
|
||||
lineX: 'Horizontally Select',
|
||||
lineY: 'Vertically Select',
|
||||
keep: 'Keep Selections',
|
||||
clear: 'Clear Selections'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Data View',
|
||||
lang: ['Data View', 'Close', 'Refresh']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Zoom Reset'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Switch to Line Chart',
|
||||
bar: 'Switch to Bar Chart',
|
||||
stack: 'Stack',
|
||||
tiled: 'Tile'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Restore'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Save as Image',
|
||||
lang: ['Right Click to Save Image']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Pie chart',
|
||||
bar: 'Bar chart',
|
||||
line: 'Line chart',
|
||||
scatter: 'Scatter plot',
|
||||
effectScatter: 'Ripple scatter plot',
|
||||
radar: 'Radar chart',
|
||||
tree: 'Tree',
|
||||
treemap: 'Treemap',
|
||||
boxplot: 'Boxplot',
|
||||
candlestick: 'Candlestick',
|
||||
k: 'K line chart',
|
||||
heatmap: 'Heat map',
|
||||
map: 'Map',
|
||||
parallel: 'Parallel coordinate map',
|
||||
lines: 'Line graph',
|
||||
graph: 'Relationship graph',
|
||||
sankey: 'Sankey diagram',
|
||||
funnel: 'Funnel chart',
|
||||
gauge: 'Gauge',
|
||||
pictorialBar: 'Pictorial bar',
|
||||
themeRiver: 'Theme River Map',
|
||||
sunburst: 'Sunburst'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'This is a chart about "{title}"',
|
||||
withoutTitle: 'This is a chart'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' with type {seriesType} named {seriesName}.',
|
||||
withoutName: ' with type {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. It consists of {seriesCount} series count.',
|
||||
withName: ' The {seriesId} series is a {seriesType} representing {seriesName}.',
|
||||
withoutName: ' The {seriesId} series is a {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'The data is as follows: ',
|
||||
partialData: 'The first {displayCnt} items are: ',
|
||||
withName: 'the data for {name} is {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: English.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'January', 'February', 'March', 'April', 'May', 'June',
|
||||
'July', 'August', 'September', 'October', 'November', 'December'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'All',
|
||||
inverse: 'Inv'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Box Select',
|
||||
polygon: 'Lasso Select',
|
||||
lineX: 'Horizontally Select',
|
||||
lineY: 'Vertically Select',
|
||||
keep: 'Keep Selections',
|
||||
clear: 'Clear Selections'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Data View',
|
||||
lang: ['Data View', 'Close', 'Refresh']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Zoom Reset'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Switch to Line Chart',
|
||||
bar: 'Switch to Bar Chart',
|
||||
stack: 'Stack',
|
||||
tiled: 'Tile'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Restore'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Save as Image',
|
||||
lang: ['Right Click to Save Image']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Pie chart',
|
||||
bar: 'Bar chart',
|
||||
line: 'Line chart',
|
||||
scatter: 'Scatter plot',
|
||||
effectScatter: 'Ripple scatter plot',
|
||||
radar: 'Radar chart',
|
||||
tree: 'Tree',
|
||||
treemap: 'Treemap',
|
||||
boxplot: 'Boxplot',
|
||||
candlestick: 'Candlestick',
|
||||
k: 'K line chart',
|
||||
heatmap: 'Heat map',
|
||||
map: 'Map',
|
||||
parallel: 'Parallel coordinate map',
|
||||
lines: 'Line graph',
|
||||
graph: 'Relationship graph',
|
||||
sankey: 'Sankey diagram',
|
||||
funnel: 'Funnel chart',
|
||||
gauge: 'Gauge',
|
||||
pictorialBar: 'Pictorial bar',
|
||||
themeRiver: 'Theme River Map',
|
||||
sunburst: 'Sunburst'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'This is a chart about "{title}"',
|
||||
withoutTitle: 'This is a chart'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' with type {seriesType} named {seriesName}.',
|
||||
withoutName: ' with type {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. It consists of {seriesCount} series count.',
|
||||
withName: ' The {seriesId} series is a {seriesType} representing {seriesName}.',
|
||||
withoutName: ' The {seriesId} series is a {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'The data is as follows: ',
|
||||
partialData: 'The first {displayCnt} items are: ',
|
||||
withName: 'the data for {name} is {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('EN', localeObj);
|
||||
|
||||
});
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio',
|
||||
'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'
|
||||
],
|
||||
monthAbbr: [
|
||||
'ene', 'feb', 'mar', 'abr', 'may', 'jun',
|
||||
'jul', 'ago', 'sep', 'oct', 'nov', 'dic'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'dom', 'lun', 'mar', 'mie', 'jue', 'vie', 'sáb'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Todas',
|
||||
inverse: 'Inversa'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Selección de cuadro',
|
||||
polygon: 'Selección de lazo',
|
||||
lineX: 'Seleccionar horizontalmente',
|
||||
lineY: 'Seleccionar verticalmente',
|
||||
keep: 'Mantener selección',
|
||||
clear: 'Despejar selecciones'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Ver datos',
|
||||
lang: ['Ver datos', 'Cerrar', 'Actualizar']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Restablecer zoom'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Cambiar a gráfico de líneas',
|
||||
bar: 'Cambiar a gráfico de barras',
|
||||
stack: 'Pila',
|
||||
tiled: 'Teja'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Restaurar'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Guardar como imagen',
|
||||
lang: ['Clic derecho para guardar imagen']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio',
|
||||
'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'
|
||||
],
|
||||
monthAbbr: [
|
||||
'ene', 'feb', 'mar', 'abr', 'may', 'jun',
|
||||
'jul', 'ago', 'sep', 'oct', 'nov', 'dic'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'dom', 'lun', 'mar', 'mie', 'jue', 'vie', 'sáb'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Todas',
|
||||
inverse: 'Inversa'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Selección de cuadro',
|
||||
polygon: 'Selección de lazo',
|
||||
lineX: 'Seleccionar horizontalmente',
|
||||
lineY: 'Seleccionar verticalmente',
|
||||
keep: 'Mantener selección',
|
||||
clear: 'Despejar selecciones'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Ver datos',
|
||||
lang: ['Ver datos', 'Cerrar', 'Actualizar']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Restablecer zoom'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Cambiar a gráfico de líneas',
|
||||
bar: 'Cambiar a gráfico de barras',
|
||||
stack: 'Pila',
|
||||
tiled: 'Teja'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Restaurar'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Guardar como imagen',
|
||||
lang: ['Clic derecho para guardar imagen']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('ES', localeObj);
|
||||
|
||||
});
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'tammikuuta', 'helmikuuta', 'maaliskuuta', 'huhtikuuta', 'toukokuuta', 'kesäkuuta',
|
||||
'heinäkuuta', 'elokuuta', 'syyskuuta', 'lokakuuta', 'marraskuuta', 'joulukuuta'
|
||||
],
|
||||
monthAbbr: [
|
||||
'tammik', 'helmik', 'maalisk', 'huhtik', 'toukok', 'kesäk',
|
||||
'heinäk', 'elok', 'syysk', 'lokak', 'marrask', 'jouluk'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'sunnuntaina', 'maanantaina', 'tiistaina', 'keskiviikkona', 'torstaina', 'perjantaina', 'lauantaina'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Kaikki',
|
||||
inverse: 'Käänteinen'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Laatikko valinta',
|
||||
polygon: 'Lasso valinta',
|
||||
lineX: 'Vaakataso valinta',
|
||||
lineY: 'Pysty valinta',
|
||||
keep: 'Pidä valinta',
|
||||
clear: 'Poista valinta'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Data näkymä',
|
||||
lang: ['Data näkymä', 'Sulje', 'Päivitä']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoomaa',
|
||||
back: 'Zoomin nollaus'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Vaihda Viivakaavioon',
|
||||
bar: 'Vaihda palkkikaavioon',
|
||||
stack: 'Pinoa',
|
||||
tiled: 'Erottele'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Palauta'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Tallenna kuvana',
|
||||
lang: ['Paina oikeaa hiirennappia tallentaaksesi kuva']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'tammikuuta', 'helmikuuta', 'maaliskuuta', 'huhtikuuta', 'toukokuuta', 'kesäkuuta',
|
||||
'heinäkuuta', 'elokuuta', 'syyskuuta', 'lokakuuta', 'marraskuuta', 'joulukuuta'
|
||||
],
|
||||
monthAbbr: [
|
||||
'tammik', 'helmik', 'maalisk', 'huhtik', 'toukok', 'kesäk',
|
||||
'heinäk', 'elok', 'syysk', 'lokak', 'marrask', 'jouluk'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'sunnuntaina', 'maanantaina', 'tiistaina', 'keskiviikkona', 'torstaina', 'perjantaina', 'lauantaina'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Kaikki',
|
||||
inverse: 'Käänteinen'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Laatikko valinta',
|
||||
polygon: 'Lasso valinta',
|
||||
lineX: 'Vaakataso valinta',
|
||||
lineY: 'Pysty valinta',
|
||||
keep: 'Pidä valinta',
|
||||
clear: 'Poista valinta'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Data näkymä',
|
||||
lang: ['Data näkymä', 'Sulje', 'Päivitä']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoomaa',
|
||||
back: 'Zoomin nollaus'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Vaihda Viivakaavioon',
|
||||
bar: 'Vaihda palkkikaavioon',
|
||||
stack: 'Pinoa',
|
||||
tiled: 'Erottele'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Palauta'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Tallenna kuvana',
|
||||
lang: ['Paina oikeaa hiirennappia tallentaaksesi kuva']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('FI', localeObj);
|
||||
|
||||
});
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Français.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
|
||||
'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Fév', 'Mars', 'Avr', 'Mai', 'Juin',
|
||||
'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Déc'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Tout',
|
||||
inverse: 'Inverse'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Sélection rectangulaire',
|
||||
polygon: 'Sélection au lasso',
|
||||
lineX: 'Sélectionner horizontalement',
|
||||
lineY: 'Sélectionner verticalement',
|
||||
keep: 'Garder la sélection',
|
||||
clear: 'Effacer la sélection'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Visualisation des données',
|
||||
lang: ['Visualisation des données', 'Fermer', 'Rafraîchir']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Zoom Remise à zéro'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Changer pour Ligne',
|
||||
bar: 'Changer pour Histogramme',
|
||||
stack: 'Superposition',
|
||||
tiled: 'Tuile'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Restaurer'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Sauvegarder l\'image',
|
||||
lang: ['Clic droit pour sauvegarder l\'image']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Camembert',
|
||||
bar: 'Histogramme',
|
||||
line: 'Ligne',
|
||||
scatter: 'Nuage de points',
|
||||
effectScatter: 'Nuage de points stylisé',
|
||||
radar: 'Radar',
|
||||
tree: 'Arbre',
|
||||
treemap: 'Treemap',
|
||||
boxplot: 'Boîte à moustaches',
|
||||
candlestick: 'Chandelier',
|
||||
k: 'Linéaire K',
|
||||
heatmap: 'Carte de fréquentation',
|
||||
map: 'Carte',
|
||||
parallel: 'Données parallèles',
|
||||
lines: 'Lignes',
|
||||
graph: 'Graphe',
|
||||
sankey: 'Sankey',
|
||||
funnel: 'Entonnoir',
|
||||
gauge: 'Jauge',
|
||||
pictorialBar: 'Barres à images',
|
||||
themeRiver: 'Stream Graph',
|
||||
sunburst: 'Sunburst'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Cette carte est intitulée "{title}"',
|
||||
withoutTitle: 'C\'est une carte'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' Avec le type de {seriesType} qui s\'appelle {seriesName}.',
|
||||
withoutName: ' Avec le type de {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: ' Elle comprend {seriesCount} séries.',
|
||||
withName: ' La série {seriesId} représente {seriesName} de {seriesType}.',
|
||||
withoutName: ' La série {seriesId} est un/une {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Les données sont: ',
|
||||
partialData: 'Les premiers {displayCnt} éléments sont : ',
|
||||
withName: 'Les données pour {name} sont {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Français.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
|
||||
'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Fév', 'Mars', 'Avr', 'Mai', 'Juin',
|
||||
'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Déc'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Tout',
|
||||
inverse: 'Inverse'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Sélection rectangulaire',
|
||||
polygon: 'Sélection au lasso',
|
||||
lineX: 'Sélectionner horizontalement',
|
||||
lineY: 'Sélectionner verticalement',
|
||||
keep: 'Garder la sélection',
|
||||
clear: 'Effacer la sélection'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Visualisation des données',
|
||||
lang: ['Visualisation des données', 'Fermer', 'Rafraîchir']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Zoom Remise à zéro'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Changer pour Ligne',
|
||||
bar: 'Changer pour Histogramme',
|
||||
stack: 'Superposition',
|
||||
tiled: 'Tuile'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Restaurer'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Sauvegarder l\'image',
|
||||
lang: ['Clic droit pour sauvegarder l\'image']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Camembert',
|
||||
bar: 'Histogramme',
|
||||
line: 'Ligne',
|
||||
scatter: 'Nuage de points',
|
||||
effectScatter: 'Nuage de points stylisé',
|
||||
radar: 'Radar',
|
||||
tree: 'Arbre',
|
||||
treemap: 'Treemap',
|
||||
boxplot: 'Boîte à moustaches',
|
||||
candlestick: 'Chandelier',
|
||||
k: 'Linéaire K',
|
||||
heatmap: 'Carte de fréquentation',
|
||||
map: 'Carte',
|
||||
parallel: 'Données parallèles',
|
||||
lines: 'Lignes',
|
||||
graph: 'Graphe',
|
||||
sankey: 'Sankey',
|
||||
funnel: 'Entonnoir',
|
||||
gauge: 'Jauge',
|
||||
pictorialBar: 'Barres à images',
|
||||
themeRiver: 'Stream Graph',
|
||||
sunburst: 'Sunburst'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Cette carte est intitulée "{title}"',
|
||||
withoutTitle: 'C\'est une carte'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' Avec le type de {seriesType} qui s\'appelle {seriesName}.',
|
||||
withoutName: ' Avec le type de {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: ' Elle comprend {seriesCount} séries.',
|
||||
withName: ' La série {seriesId} représente {seriesName} de {seriesType}.',
|
||||
withoutName: ' La série {seriesId} est un/une {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Les données sont: ',
|
||||
partialData: 'Les premiers {displayCnt} éléments sont : ',
|
||||
withName: 'Les données pour {name} sont {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('FR', localeObj);
|
||||
|
||||
});
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Italian.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno',
|
||||
'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu',
|
||||
'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Tutti',
|
||||
inverse: 'Inverso'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Selezione rettangolare',
|
||||
polygon: 'Selezione lazo',
|
||||
lineX: 'Selezione orizzontale',
|
||||
lineY: 'Selezione verticale',
|
||||
keep: 'Mantieni selezione',
|
||||
clear: 'Rimuovi selezione'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Visualizzazione dati',
|
||||
lang: ['Visualizzazione dati', 'Chiudi', 'Aggiorna']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Resetta zoom'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Passa al grafico a linee',
|
||||
bar: 'Passa al grafico a barre',
|
||||
stack: 'Pila',
|
||||
tiled: 'Piastrella'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Ripristina'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Salva come immagine',
|
||||
lang: ['Tasto destro per salvare l\'immagine']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Grafico a torta',
|
||||
bar: 'Grafico a barre',
|
||||
line: 'Grafico a linee',
|
||||
scatter: 'Grafico a dispersione',
|
||||
effectScatter: 'Ripple scatter plot',
|
||||
radar: 'Grafico radar',
|
||||
tree: 'Albero',
|
||||
treemap: 'Treemap',
|
||||
boxplot: 'Diagramma a scatola e baffi',
|
||||
candlestick: 'Candlestick',
|
||||
k: 'K line chart',
|
||||
heatmap: 'Mappa di calore',
|
||||
map: 'Mappa',
|
||||
parallel: 'Grafico a coordinate parallele',
|
||||
lines: 'Grafico a linee',
|
||||
graph: 'Diagramma delle relazioni',
|
||||
sankey: 'Diagramma di Sankey',
|
||||
funnel: 'Grafico a imbuto',
|
||||
gauge: 'Gauge',
|
||||
pictorialBar: 'Pictorial bar',
|
||||
themeRiver: 'Theme River Map',
|
||||
sunburst: 'Radiale'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Questo è un grafico su "{title}"',
|
||||
withoutTitle: 'Questo è un grafico'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' con il tipo {seriesType} denominato {seriesName}.',
|
||||
withoutName: ' con il tipo {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. È composto da {seriesCount} serie.',
|
||||
withName: ' La {seriesId} serie è un {seriesType} denominata {seriesName}.',
|
||||
withoutName: ' la {seriesId} serie è un {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'I dati sono come segue: ',
|
||||
partialData: 'I primi {displayCnt} elementi sono: ',
|
||||
withName: 'il dato per {name} è {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Italian.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno',
|
||||
'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu',
|
||||
'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Tutti',
|
||||
inverse: 'Inverso'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Selezione rettangolare',
|
||||
polygon: 'Selezione lazo',
|
||||
lineX: 'Selezione orizzontale',
|
||||
lineY: 'Selezione verticale',
|
||||
keep: 'Mantieni selezione',
|
||||
clear: 'Rimuovi selezione'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Visualizzazione dati',
|
||||
lang: ['Visualizzazione dati', 'Chiudi', 'Aggiorna']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Resetta zoom'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Passa al grafico a linee',
|
||||
bar: 'Passa al grafico a barre',
|
||||
stack: 'Pila',
|
||||
tiled: 'Piastrella'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Ripristina'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Salva come immagine',
|
||||
lang: ['Tasto destro per salvare l\'immagine']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Grafico a torta',
|
||||
bar: 'Grafico a barre',
|
||||
line: 'Grafico a linee',
|
||||
scatter: 'Grafico a dispersione',
|
||||
effectScatter: 'Ripple scatter plot',
|
||||
radar: 'Grafico radar',
|
||||
tree: 'Albero',
|
||||
treemap: 'Treemap',
|
||||
boxplot: 'Diagramma a scatola e baffi',
|
||||
candlestick: 'Candlestick',
|
||||
k: 'K line chart',
|
||||
heatmap: 'Mappa di calore',
|
||||
map: 'Mappa',
|
||||
parallel: 'Grafico a coordinate parallele',
|
||||
lines: 'Grafico a linee',
|
||||
graph: 'Diagramma delle relazioni',
|
||||
sankey: 'Diagramma di Sankey',
|
||||
funnel: 'Grafico a imbuto',
|
||||
gauge: 'Gauge',
|
||||
pictorialBar: 'Pictorial bar',
|
||||
themeRiver: 'Theme River Map',
|
||||
sunburst: 'Radiale'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Questo è un grafico su "{title}"',
|
||||
withoutTitle: 'Questo è un grafico'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' con il tipo {seriesType} denominato {seriesName}.',
|
||||
withoutName: ' con il tipo {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. È composto da {seriesCount} serie.',
|
||||
withName: ' La {seriesId} serie è un {seriesType} denominata {seriesName}.',
|
||||
withoutName: ' la {seriesId} serie è un {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'I dati sono come segue: ',
|
||||
partialData: 'I primi {displayCnt} elementi sono: ',
|
||||
withName: 'il dato per {name} è {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('IT', localeObj);
|
||||
|
||||
});
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Japanese.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月'
|
||||
],
|
||||
monthAbbr: [
|
||||
'1月', '2月', '3月', '4月', '5月', '6月',
|
||||
'7月', '8月', '9月', '10月', '11月', '12月'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'日', '月', '火', '水', '木', '金', '土'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'すべてを選択',
|
||||
inverse: '選択範囲を反転'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: '矩形選択',
|
||||
polygon: 'なげなわ選択',
|
||||
lineX: '横方向に選択',
|
||||
lineY: '縦方向に選択',
|
||||
keep: '選択範囲を維持',
|
||||
clear: '選択範囲をクリア'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'データビュー',
|
||||
lang: ['データビュー', '閉じる', 'リロード']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'ズーム',
|
||||
back: 'リセット'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: '折れ線に切り替え',
|
||||
bar: '棒に切り替え',
|
||||
stack: '積み上げに切り替え',
|
||||
tiled: 'タイル状に切り替え'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: '復元'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: '図として保存',
|
||||
lang: ['右クリックして図を保存']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: '円グラフ',
|
||||
bar: '棒グラフ',
|
||||
line: '折れ線グラフ',
|
||||
scatter: '散布図',
|
||||
effectScatter: 'エフェクト散布図',
|
||||
radar: 'レーダーチャート',
|
||||
tree: '階層グラフ',
|
||||
treemap: 'ツリーマップ',
|
||||
boxplot: '箱ひげ図',
|
||||
candlestick: 'Kチャート',
|
||||
k: 'Kチャート',
|
||||
heatmap: 'ヒートマップ',
|
||||
map: '地図',
|
||||
parallel: 'パラレルチャート',
|
||||
lines: 'ラインチャート',
|
||||
graph: '相関図',
|
||||
sankey: 'サンキーダイアグラム',
|
||||
funnel: 'ファネルグラフ',
|
||||
gauge: 'ゲージ',
|
||||
pictorialBar: '絵入り棒グラフ',
|
||||
themeRiver: 'テーマリバー',
|
||||
sunburst: 'サンバースト'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'これは「{title}」に関するチャートです。',
|
||||
withoutTitle: 'これはチャートで、'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: 'チャートのタイプは{seriesType}で、{seriesName}を示しています。',
|
||||
withoutName: 'チャートのタイプは{seriesType}です。'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '{seriesCount}つのチャートシリーズによって構成されています。',
|
||||
withName: '{seriesId}番目のシリーズは{seriesName}を示した{seriesType}で、',
|
||||
withoutName: '{seriesId}番目のシリーズは{seriesType}で、',
|
||||
separator: {
|
||||
middle: ';',
|
||||
end: '。'
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'データは:',
|
||||
partialData: 'その内、{displayCnt}番目までは:',
|
||||
withName: '{name}のデータは{value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: '、',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Japanese.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月'
|
||||
],
|
||||
monthAbbr: [
|
||||
'1月', '2月', '3月', '4月', '5月', '6月',
|
||||
'7月', '8月', '9月', '10月', '11月', '12月'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'日', '月', '火', '水', '木', '金', '土'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'すべてを選択',
|
||||
inverse: '選択範囲を反転'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: '矩形選択',
|
||||
polygon: 'なげなわ選択',
|
||||
lineX: '横方向に選択',
|
||||
lineY: '縦方向に選択',
|
||||
keep: '選択範囲を維持',
|
||||
clear: '選択範囲をクリア'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'データビュー',
|
||||
lang: ['データビュー', '閉じる', 'リロード']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'ズーム',
|
||||
back: 'リセット'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: '折れ線に切り替え',
|
||||
bar: '棒に切り替え',
|
||||
stack: '積み上げに切り替え',
|
||||
tiled: 'タイル状に切り替え'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: '復元'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: '図として保存',
|
||||
lang: ['右クリックして図を保存']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: '円グラフ',
|
||||
bar: '棒グラフ',
|
||||
line: '折れ線グラフ',
|
||||
scatter: '散布図',
|
||||
effectScatter: 'エフェクト散布図',
|
||||
radar: 'レーダーチャート',
|
||||
tree: '階層グラフ',
|
||||
treemap: 'ツリーマップ',
|
||||
boxplot: '箱ひげ図',
|
||||
candlestick: 'Kチャート',
|
||||
k: 'Kチャート',
|
||||
heatmap: 'ヒートマップ',
|
||||
map: '地図',
|
||||
parallel: 'パラレルチャート',
|
||||
lines: 'ラインチャート',
|
||||
graph: '相関図',
|
||||
sankey: 'サンキーダイアグラム',
|
||||
funnel: 'ファネルグラフ',
|
||||
gauge: 'ゲージ',
|
||||
pictorialBar: '絵入り棒グラフ',
|
||||
themeRiver: 'テーマリバー',
|
||||
sunburst: 'サンバースト'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'これは「{title}」に関するチャートです。',
|
||||
withoutTitle: 'これはチャートで、'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: 'チャートのタイプは{seriesType}で、{seriesName}を示しています。',
|
||||
withoutName: 'チャートのタイプは{seriesType}です。'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '{seriesCount}つのチャートシリーズによって構成されています。',
|
||||
withName: '{seriesId}番目のシリーズは{seriesName}を示した{seriesType}で、',
|
||||
withoutName: '{seriesId}番目のシリーズは{seriesType}で、',
|
||||
separator: {
|
||||
middle: ';',
|
||||
end: '。'
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'データは:',
|
||||
partialData: 'その内、{displayCnt}番目までは:',
|
||||
withName: '{name}のデータは{value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: '、',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('JA', localeObj);
|
||||
|
||||
});
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Korean.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'1월', '2월', '3월', '4월', '5월', '6월',
|
||||
'7월', '8월', '9월', '10월', '11월', '12월'
|
||||
],
|
||||
monthAbbr: [
|
||||
'1월', '2월', '3월', '4월', '5월', '6월',
|
||||
'7월', '8월', '9월', '10월', '11월', '12월'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'일', '월', '화', '수', '목', '금', '토'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: '모두 선택',
|
||||
inverse: '선택 범위 반전'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: '사각형 선택',
|
||||
polygon: '올가미 선택',
|
||||
lineX: '수평 선택',
|
||||
lineY: '수직 선택',
|
||||
keep: '선택 유지',
|
||||
clear: '선택 지우기'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: '날짜 보기',
|
||||
lang: ['날짜 보기', '닫기', '새로 고침']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: '확대/축소',
|
||||
back: '확대/축소 초기화'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: '꺽은선 그래프로 변경',
|
||||
bar: '막대 그래프로 변경',
|
||||
stack: '스택',
|
||||
tiled: '타일'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: '복구'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: '이미지로 저장',
|
||||
lang: ['이미지를 저장하려면 마우스 오른쪽 버튼을 클릭하세요.']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: '원 그래프',
|
||||
bar: '막대 그래프',
|
||||
line: '꺽은선 그래프',
|
||||
scatter: '산점도',
|
||||
effectScatter: '물결 효과 산점도',
|
||||
radar: '방사형 그래프',
|
||||
tree: '트리',
|
||||
treemap: '트리맵',
|
||||
boxplot: '상자 수염 그래프',
|
||||
candlestick: '캔들스틱 차트',
|
||||
k: 'K 라인 차트',
|
||||
heatmap: '히트 맵',
|
||||
map: '지도',
|
||||
parallel: '평행 좌표 맵',
|
||||
lines: '선',
|
||||
graph: '관계 그래프',
|
||||
sankey: '산키 다이어그램',
|
||||
funnel: '깔때기형 그래프',
|
||||
gauge: '계기',
|
||||
pictorialBar: '픽토그램 차트',
|
||||
themeRiver: '스트림 그래프',
|
||||
sunburst: '선버스트 차트'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: '"{title}"에 대한 차트입니다.',
|
||||
withoutTitle: '차트입니다.'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' 차트 유형은 {seriesType}이며 {seriesName}을 표시합니다.',
|
||||
withoutName: ' 차트 유형은 {seriesType}입니다.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. {seriesCount} 하나의 차트 시리즈로 구성됩니다.',
|
||||
withName: ' {seriesId}번째 시리즈는 {seriesName}을 나타내는 {seriesType} representing.',
|
||||
withoutName: ' {seriesId}번째 시리즈는 {seriesType}입니다.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: '데이터: ',
|
||||
partialData: '첫번째 {displayCnt} 아이템: ',
|
||||
withName: '{name}의 데이터는 {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Korean.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'1월', '2월', '3월', '4월', '5월', '6월',
|
||||
'7월', '8월', '9월', '10월', '11월', '12월'
|
||||
],
|
||||
monthAbbr: [
|
||||
'1월', '2월', '3월', '4월', '5월', '6월',
|
||||
'7월', '8월', '9월', '10월', '11월', '12월'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'일', '월', '화', '수', '목', '금', '토'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: '모두 선택',
|
||||
inverse: '선택 범위 반전'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: '사각형 선택',
|
||||
polygon: '올가미 선택',
|
||||
lineX: '수평 선택',
|
||||
lineY: '수직 선택',
|
||||
keep: '선택 유지',
|
||||
clear: '선택 지우기'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: '날짜 보기',
|
||||
lang: ['날짜 보기', '닫기', '새로 고침']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: '확대/축소',
|
||||
back: '확대/축소 초기화'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: '꺽은선 그래프로 변경',
|
||||
bar: '막대 그래프로 변경',
|
||||
stack: '스택',
|
||||
tiled: '타일'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: '복구'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: '이미지로 저장',
|
||||
lang: ['이미지를 저장하려면 마우스 오른쪽 버튼을 클릭하세요.']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: '원 그래프',
|
||||
bar: '막대 그래프',
|
||||
line: '꺽은선 그래프',
|
||||
scatter: '산점도',
|
||||
effectScatter: '물결 효과 산점도',
|
||||
radar: '방사형 그래프',
|
||||
tree: '트리',
|
||||
treemap: '트리맵',
|
||||
boxplot: '상자 수염 그래프',
|
||||
candlestick: '캔들스틱 차트',
|
||||
k: 'K 라인 차트',
|
||||
heatmap: '히트 맵',
|
||||
map: '지도',
|
||||
parallel: '평행 좌표 맵',
|
||||
lines: '선',
|
||||
graph: '관계 그래프',
|
||||
sankey: '산키 다이어그램',
|
||||
funnel: '깔때기형 그래프',
|
||||
gauge: '계기',
|
||||
pictorialBar: '픽토그램 차트',
|
||||
themeRiver: '스트림 그래프',
|
||||
sunburst: '선버스트 차트'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: '"{title}"에 대한 차트입니다.',
|
||||
withoutTitle: '차트입니다.'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' 차트 유형은 {seriesType}이며 {seriesName}을 표시합니다.',
|
||||
withoutName: ' 차트 유형은 {seriesType}입니다.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. {seriesCount} 하나의 차트 시리즈로 구성됩니다.',
|
||||
withName: ' {seriesId}번째 시리즈는 {seriesName}을 나타내는 {seriesType} representing.',
|
||||
withoutName: ' {seriesId}번째 시리즈는 {seriesType}입니다.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: '데이터: ',
|
||||
partialData: '첫번째 {displayCnt} 아이템: ',
|
||||
withName: '{name}의 데이터는 {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('KO', localeObj);
|
||||
|
||||
});
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Polish
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec',
|
||||
'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze',
|
||||
'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Nie', 'Pon', 'Wto', 'Śro', 'Czw', 'Pią', 'Sob'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Wszystko',
|
||||
inverse: 'Odwróć'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Zaznaczenie prostokątne',
|
||||
polygon: 'Zaznaczanie lasso',
|
||||
lineX: 'Zaznaczenie poziome',
|
||||
lineY: 'Zaznaczenie pionowe',
|
||||
keep: 'Zachowaj zaznaczenie',
|
||||
clear: 'Wyczyść zaznaczenie'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Widok danych',
|
||||
lang: ['Widok danych', 'Zamknij', 'Odśwież']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Przybliżenie',
|
||||
back: 'Resetuj przybliżenie'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Przełącz na wykres liniowy',
|
||||
bar: 'Przełącz na wykres słupkowy',
|
||||
stack: 'Przełącz na wykres słupkowy skumulowany',
|
||||
tiled: 'Przełącz na kafelki'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Przywróć'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Zapisz jako obrazek',
|
||||
lang: ['Kliknij prawym klawiszem myszy aby zapisać']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Wykres kołowy',
|
||||
bar: 'Wykres słupkowy',
|
||||
line: 'Wykres liniowy',
|
||||
scatter: 'Wykres punktowy',
|
||||
effectScatter: 'Wykres punktowy z efektem falowania',
|
||||
radar: 'Wykres radarowy',
|
||||
tree: 'Drzewo',
|
||||
treemap: 'Mapa drzewa',
|
||||
boxplot: 'Wykres pudełkowy',
|
||||
candlestick: 'Wykres świecowy',
|
||||
k: 'Wykres linii K',
|
||||
heatmap: 'Mapa ciepła',
|
||||
map: 'Mapa',
|
||||
parallel: 'Wykres współrzędnych równoległych',
|
||||
lines: 'Diagram linii',
|
||||
graph: 'Graf relacji',
|
||||
sankey: 'Wykres Sankeya',
|
||||
funnel: 'Wykres lejkowy',
|
||||
gauge: 'Wykres zegarowy',
|
||||
pictorialBar: 'Wykres słupkowy obrazkowy',
|
||||
themeRiver: 'Wykres rzeki tematycznej',
|
||||
sunburst: 'Wykres hierarchiczny słonecznikowy'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'To jest wykres dotyczący "{title}"',
|
||||
withoutTitle: 'To jest wykres'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' typu {seriesType} nazwana {seriesName}.',
|
||||
withoutName: ' typu {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Składający się z {seriesCount} serii danych.',
|
||||
withName: ' Seria danych {seriesId} jest serią typu {seriesType} przedstawiającą {seriesName}.',
|
||||
withoutName: ' Seria danych {seriesId} jest serią typu {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Dane są następujące: ',
|
||||
partialData: 'Pierwszych {displayCnt} elementów to: ',
|
||||
withName: 'dane dla {name} to {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Polish
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec',
|
||||
'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze',
|
||||
'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Nie', 'Pon', 'Wto', 'Śro', 'Czw', 'Pią', 'Sob'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Wszystko',
|
||||
inverse: 'Odwróć'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Zaznaczenie prostokątne',
|
||||
polygon: 'Zaznaczanie lasso',
|
||||
lineX: 'Zaznaczenie poziome',
|
||||
lineY: 'Zaznaczenie pionowe',
|
||||
keep: 'Zachowaj zaznaczenie',
|
||||
clear: 'Wyczyść zaznaczenie'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Widok danych',
|
||||
lang: ['Widok danych', 'Zamknij', 'Odśwież']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Przybliżenie',
|
||||
back: 'Resetuj przybliżenie'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Przełącz na wykres liniowy',
|
||||
bar: 'Przełącz na wykres słupkowy',
|
||||
stack: 'Przełącz na wykres słupkowy skumulowany',
|
||||
tiled: 'Przełącz na kafelki'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Przywróć'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Zapisz jako obrazek',
|
||||
lang: ['Kliknij prawym klawiszem myszy aby zapisać']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Wykres kołowy',
|
||||
bar: 'Wykres słupkowy',
|
||||
line: 'Wykres liniowy',
|
||||
scatter: 'Wykres punktowy',
|
||||
effectScatter: 'Wykres punktowy z efektem falowania',
|
||||
radar: 'Wykres radarowy',
|
||||
tree: 'Drzewo',
|
||||
treemap: 'Mapa drzewa',
|
||||
boxplot: 'Wykres pudełkowy',
|
||||
candlestick: 'Wykres świecowy',
|
||||
k: 'Wykres linii K',
|
||||
heatmap: 'Mapa ciepła',
|
||||
map: 'Mapa',
|
||||
parallel: 'Wykres współrzędnych równoległych',
|
||||
lines: 'Diagram linii',
|
||||
graph: 'Graf relacji',
|
||||
sankey: 'Wykres Sankeya',
|
||||
funnel: 'Wykres lejkowy',
|
||||
gauge: 'Wykres zegarowy',
|
||||
pictorialBar: 'Wykres słupkowy obrazkowy',
|
||||
themeRiver: 'Wykres rzeki tematycznej',
|
||||
sunburst: 'Wykres hierarchiczny słonecznikowy'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'To jest wykres dotyczący "{title}"',
|
||||
withoutTitle: 'To jest wykres'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' typu {seriesType} nazwana {seriesName}.',
|
||||
withoutName: ' typu {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Składający się z {seriesCount} serii danych.',
|
||||
withName: ' Seria danych {seriesId} jest serią typu {seriesType} przedstawiającą {seriesName}.',
|
||||
withoutName: ' Seria danych {seriesId} jest serią typu {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Dane są następujące: ',
|
||||
partialData: 'Pierwszych {displayCnt} elementów to: ',
|
||||
withName: 'dane dla {name} to {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('PL', localeObj);
|
||||
|
||||
});
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Portuguese (Brazil).
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho',
|
||||
'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun',
|
||||
'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Domingo', 'Segunda-feira', 'Terça-feira', 'Quarta-feira',
|
||||
'Quinta-feira', 'Sexta-feira', 'Sábado'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Todas',
|
||||
inverse: 'Inv'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Seleção retangular',
|
||||
polygon: 'Seleção em laço',
|
||||
lineX: 'Selecionar horizontalmente',
|
||||
lineY: 'Selecionar verticalmente',
|
||||
keep: 'Manter seleções',
|
||||
clear: 'Limpar seleções'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Exibição de dados',
|
||||
lang: ['Exibição de dados', 'Fechar', 'Atualizar']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Restaurar Zoom'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Trocar para gráfico de linhas',
|
||||
bar: 'Trocar para gráfico de barras',
|
||||
stack: 'Empilhar',
|
||||
tiled: 'Tile'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Restore'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Salvar como imagem',
|
||||
lang: ['Clique com o botão direito para salvar imagem']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Gráfico de pizza',
|
||||
bar: 'Gráfico de barras',
|
||||
line: 'Gráfico de linhas',
|
||||
scatter: 'Gráfico de dispersão',
|
||||
effectScatter: 'Gráfico de dispersão ondulado',
|
||||
radar: 'Gráfico radar',
|
||||
tree: 'Árvore',
|
||||
treemap: 'Treemap',
|
||||
boxplot: 'Boxplot',
|
||||
candlestick: 'Candlestick',
|
||||
k: 'Gráfico K line',
|
||||
heatmap: 'Mapa de calor',
|
||||
map: 'Mapa',
|
||||
parallel: 'Coordenadas paralelas',
|
||||
lines: 'Gráfico de linhas',
|
||||
graph: 'Relationship graph',
|
||||
sankey: 'Gráfico Sankey',
|
||||
funnel: 'Gráfico de funil',
|
||||
gauge: 'Gauge',
|
||||
pictorialBar: 'Pictorial bar',
|
||||
themeRiver: 'Theme River Map',
|
||||
sunburst: 'Sunburst'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Este é um gráfico entitulado "{title}"',
|
||||
withoutTitle: 'Este é um gráfico'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' do tipo {seriesType} nomeada/nomeado como {seriesName}.',
|
||||
withoutName: ' do tipo {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Consiste de {seriesCount} séries.',
|
||||
withName: ' A {seriesId} série é um/uma {seriesType} representando {seriesName}.',
|
||||
withoutName: ' A {seriesId} series é um/uma {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Os dados são: ',
|
||||
partialData: 'As primeiros {displayCnt} itens são: ',
|
||||
withName: 'os dados para {name} são {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Portuguese (Brazil).
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho',
|
||||
'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun',
|
||||
'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Domingo', 'Segunda-feira', 'Terça-feira', 'Quarta-feira',
|
||||
'Quinta-feira', 'Sexta-feira', 'Sábado'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Todas',
|
||||
inverse: 'Inv'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Seleção retangular',
|
||||
polygon: 'Seleção em laço',
|
||||
lineX: 'Selecionar horizontalmente',
|
||||
lineY: 'Selecionar verticalmente',
|
||||
keep: 'Manter seleções',
|
||||
clear: 'Limpar seleções'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Exibição de dados',
|
||||
lang: ['Exibição de dados', 'Fechar', 'Atualizar']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Restaurar Zoom'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Trocar para gráfico de linhas',
|
||||
bar: 'Trocar para gráfico de barras',
|
||||
stack: 'Empilhar',
|
||||
tiled: 'Tile'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Restore'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Salvar como imagem',
|
||||
lang: ['Clique com o botão direito para salvar imagem']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Gráfico de pizza',
|
||||
bar: 'Gráfico de barras',
|
||||
line: 'Gráfico de linhas',
|
||||
scatter: 'Gráfico de dispersão',
|
||||
effectScatter: 'Gráfico de dispersão ondulado',
|
||||
radar: 'Gráfico radar',
|
||||
tree: 'Árvore',
|
||||
treemap: 'Treemap',
|
||||
boxplot: 'Boxplot',
|
||||
candlestick: 'Candlestick',
|
||||
k: 'Gráfico K line',
|
||||
heatmap: 'Mapa de calor',
|
||||
map: 'Mapa',
|
||||
parallel: 'Coordenadas paralelas',
|
||||
lines: 'Gráfico de linhas',
|
||||
graph: 'Relationship graph',
|
||||
sankey: 'Gráfico Sankey',
|
||||
funnel: 'Gráfico de funil',
|
||||
gauge: 'Gauge',
|
||||
pictorialBar: 'Pictorial bar',
|
||||
themeRiver: 'Theme River Map',
|
||||
sunburst: 'Sunburst'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Este é um gráfico entitulado "{title}"',
|
||||
withoutTitle: 'Este é um gráfico'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' do tipo {seriesType} nomeada/nomeado como {seriesName}.',
|
||||
withoutName: ' do tipo {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Consiste de {seriesCount} séries.',
|
||||
withName: ' A {seriesId} série é um/uma {seriesType} representando {seriesName}.',
|
||||
withoutName: ' A {seriesId} series é um/uma {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Os dados são: ',
|
||||
partialData: 'As primeiros {displayCnt} itens são: ',
|
||||
withName: 'os dados para {name} são {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('PT-br', localeObj);
|
||||
|
||||
});
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Romanian.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie',
|
||||
'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie'
|
||||
],
|
||||
monthAbbr: [
|
||||
'ian.', 'febr.', 'mart.', 'apr.', 'mai', 'iun.',
|
||||
'iul.', 'aug.', 'sept.', 'oct.', 'nov.', 'dec.'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Duminică', 'Luni', 'Marți', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'du.', 'lu.', 'ma.', 'mi.', 'jo.', 'vi.', 'sâ.'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Toate',
|
||||
inverse: 'Inversează'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Selecție dreptunghiulară',
|
||||
polygon: 'Selecție lasso',
|
||||
lineX: 'Selecție orizontală',
|
||||
lineY: 'Selecție verticală',
|
||||
keep: 'Păstrează selecția',
|
||||
clear: 'Șterge selecția'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Vizualizarea datelor',
|
||||
lang: ['Vizualizarea datelor', 'Închide', 'Reîmprospătează']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Resetează zoom'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Comută la diagramă cu linii',
|
||||
bar: 'Comută la diagramă cu bare',
|
||||
stack: 'Suprapune',
|
||||
tiled: 'Alătură'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Resetează'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Salvează ca imagine',
|
||||
lang: ['Clic dreapta pentru a salva ca imagine']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Diagramă radială',
|
||||
bar: 'Diagramă cu bare',
|
||||
line: 'Diagramă cu linii',
|
||||
scatter: 'Diagramă de dispersie',
|
||||
effectScatter: 'Diagramă de dispersie stilizată',
|
||||
radar: 'Diagramă radar',
|
||||
tree: 'Arbore',
|
||||
treemap: 'Hartă de arbori',
|
||||
boxplot: 'Diagramă boxbare',
|
||||
candlestick: 'Diagramă bursieră',
|
||||
k: 'Diagramă cu linii K',
|
||||
heatmap: 'Hartă termografică',
|
||||
map: 'Hartă',
|
||||
parallel: 'Hartă de coordonate paralele',
|
||||
lines: 'Linii',
|
||||
graph: 'Graf',
|
||||
sankey: 'Diagramă Sankey',
|
||||
funnel: 'Diagramă pâlnie',
|
||||
gauge: 'Calibru',
|
||||
pictorialBar: 'Diagramă cu bare picturale',
|
||||
themeRiver: 'Streamgraph',
|
||||
sunburst: 'Diagramă rază de soare'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Aceasta este o diagrmă despre "{title}"',
|
||||
withoutTitle: 'Aceasta este o diagramă'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' de tipul {seriesType} denumită {seriesName}.',
|
||||
withoutName: ' de tipul {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Este alcătuită din {seriesCount} serii.',
|
||||
withName: ' Seria {seriesId} este de tipul {seriesType} și reprezintă {seriesName}.',
|
||||
withoutName: ' Seria {seriesId} este de tipul {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Datele sunt: ',
|
||||
partialData: 'Primele {displayCnt} elemente sunt: ',
|
||||
withName: 'datele pentru {name} sunt {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Romanian.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie',
|
||||
'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie'
|
||||
],
|
||||
monthAbbr: [
|
||||
'ian.', 'febr.', 'mart.', 'apr.', 'mai', 'iun.',
|
||||
'iul.', 'aug.', 'sept.', 'oct.', 'nov.', 'dec.'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Duminică', 'Luni', 'Marți', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'du.', 'lu.', 'ma.', 'mi.', 'jo.', 'vi.', 'sâ.'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Toate',
|
||||
inverse: 'Inversează'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Selecție dreptunghiulară',
|
||||
polygon: 'Selecție lasso',
|
||||
lineX: 'Selecție orizontală',
|
||||
lineY: 'Selecție verticală',
|
||||
keep: 'Păstrează selecția',
|
||||
clear: 'Șterge selecția'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Vizualizarea datelor',
|
||||
lang: ['Vizualizarea datelor', 'Închide', 'Reîmprospătează']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Zoom',
|
||||
back: 'Resetează zoom'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Comută la diagramă cu linii',
|
||||
bar: 'Comută la diagramă cu bare',
|
||||
stack: 'Suprapune',
|
||||
tiled: 'Alătură'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Resetează'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Salvează ca imagine',
|
||||
lang: ['Clic dreapta pentru a salva ca imagine']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Diagramă radială',
|
||||
bar: 'Diagramă cu bare',
|
||||
line: 'Diagramă cu linii',
|
||||
scatter: 'Diagramă de dispersie',
|
||||
effectScatter: 'Diagramă de dispersie stilizată',
|
||||
radar: 'Diagramă radar',
|
||||
tree: 'Arbore',
|
||||
treemap: 'Hartă de arbori',
|
||||
boxplot: 'Diagramă boxbare',
|
||||
candlestick: 'Diagramă bursieră',
|
||||
k: 'Diagramă cu linii K',
|
||||
heatmap: 'Hartă termografică',
|
||||
map: 'Hartă',
|
||||
parallel: 'Hartă de coordonate paralele',
|
||||
lines: 'Linii',
|
||||
graph: 'Graf',
|
||||
sankey: 'Diagramă Sankey',
|
||||
funnel: 'Diagramă pâlnie',
|
||||
gauge: 'Calibru',
|
||||
pictorialBar: 'Diagramă cu bare picturale',
|
||||
themeRiver: 'Streamgraph',
|
||||
sunburst: 'Diagramă rază de soare'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Aceasta este o diagrmă despre "{title}"',
|
||||
withoutTitle: 'Aceasta este o diagramă'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' de tipul {seriesType} denumită {seriesName}.',
|
||||
withoutName: ' de tipul {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Este alcătuită din {seriesCount} serii.',
|
||||
withName: ' Seria {seriesId} este de tipul {seriesType} și reprezintă {seriesName}.',
|
||||
withoutName: ' Seria {seriesId} este de tipul {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Datele sunt: ',
|
||||
partialData: 'Primele {displayCnt} elemente sunt: ',
|
||||
withName: 'datele pentru {name} sunt {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('RO', localeObj);
|
||||
|
||||
});
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Russian.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь',
|
||||
'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн',
|
||||
'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Всё',
|
||||
inverse: 'Обратить'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Выделить область',
|
||||
polygon: 'Инструмент «Лассо»',
|
||||
lineX: 'Горизонтальное выделение',
|
||||
lineY: 'Вертикальное выделение',
|
||||
keep: 'Оставить выбранное',
|
||||
clear: 'Очистить выбранное'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Данные',
|
||||
lang: ['Данные', 'Закрыть', 'Обновить']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Увеличить',
|
||||
back: 'Сбросить увеличение'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Переключиться на линейный график',
|
||||
bar: 'Переключиться на столбчатую диаграмму',
|
||||
stack: 'Стопка',
|
||||
tiled: 'Плитка'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Восстановить'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Сохранить картинку',
|
||||
lang: ['Правый клик, чтобы сохранить картинку']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Круговая диаграмма',
|
||||
bar: 'Столбчатая диаграмма',
|
||||
line: 'Линейный график',
|
||||
scatter: 'Точечная диаграмма',
|
||||
effectScatter: 'Точечная диаграмма с волнами',
|
||||
radar: 'Лепестковая диаграмма',
|
||||
tree: 'Дерево',
|
||||
treemap: 'Плоское дерево',
|
||||
boxplot: 'Ящик с усами',
|
||||
candlestick: 'Свечной график',
|
||||
k: 'График К-линий',
|
||||
heatmap: 'Тепловая карта',
|
||||
map: 'Карта',
|
||||
parallel: 'Диаграмма параллельных координат',
|
||||
lines: 'Линейный граф',
|
||||
graph: 'Граф отношений',
|
||||
sankey: 'Диаграмма Санкей',
|
||||
funnel: 'Воронкообразная диаграмма',
|
||||
gauge: 'Шкала',
|
||||
pictorialBar: 'Столбец-картинка',
|
||||
themeRiver: 'Тематическая река',
|
||||
sunburst: 'Солнечные лучи'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Это график, показывающий "{title}"',
|
||||
withoutTitle: 'Это график'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' с типом {seriesType} и именем {seriesName}.',
|
||||
withoutName: ' с типом {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Он состоит из {seriesCount} серий.',
|
||||
withName:
|
||||
' Серия {seriesId} имеет тип {seriesType} и показывает {seriesName}.',
|
||||
withoutName: ' Серия {seriesId} имеет тип {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Данные таковы: ',
|
||||
partialData: 'Первые {displayCnt} элементов: ',
|
||||
withName: 'значение для {name} — {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports', 'echarts'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports, require('echarts/lib/echarts'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({}, root.echarts);
|
||||
}
|
||||
})(this, function(exports, echarts) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Russian.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь',
|
||||
'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн',
|
||||
'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Всё',
|
||||
inverse: 'Обратить'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Выделить область',
|
||||
polygon: 'Инструмент «Лассо»',
|
||||
lineX: 'Горизонтальное выделение',
|
||||
lineY: 'Вертикальное выделение',
|
||||
keep: 'Оставить выбранное',
|
||||
clear: 'Очистить выбранное'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Данные',
|
||||
lang: ['Данные', 'Закрыть', 'Обновить']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Увеличить',
|
||||
back: 'Сбросить увеличение'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Переключиться на линейный график',
|
||||
bar: 'Переключиться на столбчатую диаграмму',
|
||||
stack: 'Стопка',
|
||||
tiled: 'Плитка'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Восстановить'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Сохранить картинку',
|
||||
lang: ['Правый клик, чтобы сохранить картинку']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Круговая диаграмма',
|
||||
bar: 'Столбчатая диаграмма',
|
||||
line: 'Линейный график',
|
||||
scatter: 'Точечная диаграмма',
|
||||
effectScatter: 'Точечная диаграмма с волнами',
|
||||
radar: 'Лепестковая диаграмма',
|
||||
tree: 'Дерево',
|
||||
treemap: 'Плоское дерево',
|
||||
boxplot: 'Ящик с усами',
|
||||
candlestick: 'Свечной график',
|
||||
k: 'График К-линий',
|
||||
heatmap: 'Тепловая карта',
|
||||
map: 'Карта',
|
||||
parallel: 'Диаграмма параллельных координат',
|
||||
lines: 'Линейный граф',
|
||||
graph: 'Граф отношений',
|
||||
sankey: 'Диаграмма Санкей',
|
||||
funnel: 'Воронкообразная диаграмма',
|
||||
gauge: 'Шкала',
|
||||
pictorialBar: 'Столбец-картинка',
|
||||
themeRiver: 'Тематическая река',
|
||||
sunburst: 'Солнечные лучи'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'Это график, показывающий "{title}"',
|
||||
withoutTitle: 'Это график'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' с типом {seriesType} и именем {seriesName}.',
|
||||
withoutName: ' с типом {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Он состоит из {seriesCount} серий.',
|
||||
withName:
|
||||
' Серия {seriesId} имеет тип {seriesType} и показывает {seriesName}.',
|
||||
withoutName: ' Серия {seriesId} имеет тип {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Данные таковы: ',
|
||||
partialData: 'Первые {displayCnt} элементов: ',
|
||||
withName: 'значение для {name} — {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
echarts.registerLocale('RU', localeObj);
|
||||
|
||||
});
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['exports'], factory);
|
||||
} else if (
|
||||
typeof exports === 'object' &&
|
||||
typeof exports.nodeName !== 'string'
|
||||
) {
|
||||
// CommonJS
|
||||
factory(exports);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory({});
|
||||
}
|
||||
})(this, function(exports) {
|
||||
|
||||
|
||||
/**
|
||||
* Language: Slovenian.
|
||||
*/
|
||||
|
||||
var localeObj = {
|
||||
time: {
|
||||
month: [
|
||||
'Januar', 'Februar', 'Marec', 'April', 'Maj', 'Junij',
|
||||
'Julij', 'Avgust', 'September', 'Oktober', 'November', 'December'
|
||||
],
|
||||
monthAbbr: [
|
||||
'Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun',
|
||||
'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'
|
||||
],
|
||||
dayOfWeek: [
|
||||
'Nedelja', 'Ponedeljek', 'Torek', 'Sreda', 'Četrtek', 'Petek', 'Sobota'
|
||||
],
|
||||
dayOfWeekAbbr: [
|
||||
'Ned', 'Pon', 'Tor', 'Sre', 'Čet', 'Pet', 'Sob'
|
||||
]
|
||||
},
|
||||
legend: {
|
||||
selector: {
|
||||
all: 'Vsi',
|
||||
inverse: 'Obratno'
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
brush: {
|
||||
title: {
|
||||
rect: 'Izbor s pravokotnikom',
|
||||
polygon: 'Izbor z lasom',
|
||||
lineX: 'Vodoravni izbor',
|
||||
lineY: 'Navpični izbor',
|
||||
keep: 'Ohrani izbor',
|
||||
clear: 'Počisti izbor'
|
||||
}
|
||||
},
|
||||
dataView: {
|
||||
title: 'Pogled podatkov',
|
||||
lang: ['Pogled podatkov', 'Zapri', 'Osveži']
|
||||
},
|
||||
dataZoom: {
|
||||
title: {
|
||||
zoom: 'Približaj',
|
||||
back: 'Povrni velikost'
|
||||
}
|
||||
},
|
||||
magicType: {
|
||||
title: {
|
||||
line: 'Preklopi na črtni grafikon',
|
||||
bar: 'Preklopi na stolpčni grafikon',
|
||||
stack: 'Naloži',
|
||||
tiled: 'Drug ob drugem'
|
||||
}
|
||||
},
|
||||
restore: {
|
||||
title: 'Povrni'
|
||||
},
|
||||
saveAsImage: {
|
||||
title: 'Shrani kot sliko',
|
||||
lang: ['Z desnim klikom shrani sliko']
|
||||
}
|
||||
},
|
||||
series: {
|
||||
typeNames: {
|
||||
pie: 'Tortni grafikon',
|
||||
bar: 'Stolpčni grafikon',
|
||||
line: 'Črtni grafikon',
|
||||
scatter: 'Raztreseni grafikon',
|
||||
effectScatter: 'Raztreseni grafikon z efektom',
|
||||
radar: 'Radarski grafikon',
|
||||
tree: 'Drevo',
|
||||
treemap: 'Drevesna struktura',
|
||||
boxplot: 'Boxplot grafikon',
|
||||
candlestick: 'Svečni grafikon',
|
||||
k: 'K line grafikon',
|
||||
heatmap: 'Toplotni zemljevid',
|
||||
map: 'Zemljevid',
|
||||
parallel: 'Zemljevid vzporednih koordinat',
|
||||
lines: 'Črtni grafikon',
|
||||
graph: 'Grafikon razmerij',
|
||||
sankey: 'Sankey grafikon',
|
||||
funnel: 'Lijakasti grafikon',
|
||||
gauge: 'Števec',
|
||||
pictorialBar: 'Stolpčni grafikon s podobo',
|
||||
themeRiver: 'Tematski rečni grafikon',
|
||||
sunburst: 'Večnivojski tortni grafikon'
|
||||
}
|
||||
},
|
||||
aria: {
|
||||
general: {
|
||||
withTitle: 'To je grafikon z naslovom "{title}"',
|
||||
withoutTitle: 'To je grafikon'
|
||||
},
|
||||
series: {
|
||||
single: {
|
||||
prefix: '',
|
||||
withName: ' tipa {seriesType} imenovan {seriesName}.',
|
||||
withoutName: ' tipa {seriesType}.'
|
||||
},
|
||||
multiple: {
|
||||
prefix: '. Sestavljen iz {seriesCount} nizov.',
|
||||
withName: ' Niz {seriesId} je tipa {seriesType} z nazivom {seriesName}.',
|
||||
withoutName: ' Niz {seriesId} je tipa {seriesType}.',
|
||||
separator: {
|
||||
middle: '',
|
||||
end: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
allData: 'Podatki so naslednji: ',
|
||||
partialData: 'Prvih {displayCnt} elementov je: ',
|
||||
withName: 'podatek za {name} je {value}',
|
||||
withoutName: '{value}',
|
||||
separator: {
|
||||
middle: ', ',
|
||||
end: '. '
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
for (var key in localeObj) {
|
||||
if (localeObj.hasOwnProperty(key)) {
|
||||
exports[key] = localeObj[key];
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user