https://github.com/r32/echarts-hx
Externs of echarts v3.x for Haxe
https://github.com/r32/echarts-hx
Last synced: 4 months ago
JSON representation
Externs of echarts v3.x for Haxe
- Host: GitHub
- URL: https://github.com/r32/echarts-hx
- Owner: R32
- Created: 2016-08-31T10:05:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-04T11:09:49.000Z (almost 10 years ago)
- Last Synced: 2025-02-12T03:17:20.016Z (over 1 year ago)
- Language: Haxe
- Homepage:
- Size: 80.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Externs of [echarts v3.x](https://github.com/ecomfe/echarts) for Haxe
-----
**WIP(未完成)**
## Usage
QuickStart :
* Requirements : **haxe** 3.2+
```haxe
import js.Browser.document;
class Main{
static function main() {
var ec = js.Echarts.init( document.getElementById("ec") );
ec.setOption( {
title: {
text: "Echarts 入门示例",
},
tooltip: {},
legend: {
data: ["销量"]
},
xAxis: {
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
},
yAxis: {},
series: {
name: "销量",
type: "bar",
data: [5, 20, 36, 10, 10, 20]
}
});
}
}
```
Generated To Javascript :
```js
// Generated by Haxe 3.3.0 (git build development @ cf38ee4)
(function () { "use strict";
var ETest = function() { };
ETest.main = function() {
echarts.init(window.document.getElementById("ec")).setOption({ title : { text : "Echarts 入门示例"}, tooltip : { }, legend : { data : ["销量"]}, xAxis : { data : ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]}, yAxis : { }, series : { name : "销量", type : "bar", data : [5,20,36,10,10,20]}});
};
ETest.main();
})();
```
------
IntelliSense(智能语法提示与自动完成):

------
for `haxe.extern.EitherType` :
```haxe
ec.on(ActionEvent.DATARANGESELECTED, function(param) {
var range: Array = cast param.selected;
// or
trace((param.selected: Array).length);
//trace((param.selected: Dynamic).some);
});
```
## Status
* [x] echarts : `js.Echarts`
* [x] action : `js.echarts.Action`
* [x] events : `js.echarts.Event, MouseEvent, ActionEvent, OptionsEvent`
* [ ] options : `js.echarts.SetOptions`
- [x] MISC ATTRIBUTES :
`package js.echarts.options` :
- [x] title :
- [x] legend :
- [x] grid :
- [x] xAxis :
- [x] yAxis :
- [x] polar :
- [x] radiusAxis :
- [x] angleAxis :
- [x] radar :
- [x] dataZoom :
- [x] visualMap :
- [x] tooltip :
- [x] toolbox :
- [x] brush :
- [x] geo :
- [x] parallel :
- [x] parallelAxis :
- [x] singleAxis :
- [x] timeline :
- [ ] series :
Optional:
* [ ] echarts.graphic
- [x] LinearGradient
- [x] RadialGradient
- [ ] ......
* [x] echarts.color : `js.echarts.Color`
### Difference
* `action.tooltip.showTip` is separated into an `SHOWTIPXY` and `SHOWTIP`, However, they are actually the same value