liekkas / ng-echarts Goto Github PK
View Code? Open in Web Editor NEW:tiger: angularjs + echarts
Home Page: http://liekkas.github.io/ng-echarts/index3.html
:tiger: angularjs + echarts
Home Page: http://liekkas.github.io/ng-echarts/index3.html
Hello,
Are there examples with angularjs 2?
这个问题我已经用调用内部的refreshChart方法解决,但是当外部容器缩小到一定程度echart图的宽高就变成0了
我已经按照设置了图标,为什么会有图标不出现的问题,谢谢
例如:
<ng-echarts class="col-lg-12 echarts"
style="min-height:300px;width:840px;padding:0"
ng-if="pc.panel.panel_type<=4"
ec-config="pc.ecConfig"
ec-option="pc.ecOption"
ec-resize="pc.ecResize"> </ng-echarts>
<ng-echarts class="col-lg-12 echarts"
style="min-height:300px;width:840px;padding:0"
ng-if="pc.panel.panel_type<=4"
ec-config="pc.ecConfig"
ec-option="pc.ecOption"
ec-resize="pc.ecResize"></ng-echarts>
只能显示一个
請教一下,是否能夠同步顯示多圖?看官網上的例子是使用connect把不同的echart連接起來的。謝謝
toolbox里面设置了,还是不能保存,请问怎么处理
可否封装一下echart里的树形
谢谢, 可以升级到3.0 版本吗?
我的页面是ionic+echarts来开发,引入了ngchart;
ng-echart 嵌套在ion-item里面,此时界面点击出toolTip后,点击canvas的空白处,会导致toolTip无法显示出来,大概看了下,如果把ng-echart的 position: relative; 去掉的话就没问题,这个该怎么解决?
看ng-echarts.js并没有封装dispatchaction功能,我修改了之后可以用,但每次跳index都会刷新chart使得浏览器自动关闭,而不是像官网的dispatch demo并没有刷新chart。
请问可以怎样改呢?
/**
Created by liekkas.zeng on 2015/1/7.
*/
angular.module('ng-echarts',[])
.directive('ngEcharts',[function(){
return {
link: function(scope,element,attrs,ctrl,$window){
function refreshChart(){
var theme = (scope.config && scope.config.theme)
? scope.config.theme : 'default';
var chart = echarts.init(element[0],theme);
var app = {};
if(scope.config && scope.config.dataLoaded === false){
chart.showLoading();
}
if(scope.config && scope.config.dataLoaded){
chart.setOption(scope.option);
chart.resize();
chart.hideLoading();
}
if(scope.config && scope.config.event){
if(angular.isArray(scope.config.event)){
angular.forEach(scope.config.event,function(value,key){
for(var e in value){
chart.on(e,value[e]);
}
});
}
}
// chart.dispatchAction({
// type: 'downplay',
// seriesIndex: 0,
// dataIndex: scope.currentIndex;
// });
if(angular.isDefined(scope.currentIndex)){
chart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: scope.currentIndex
});
chart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: scope.currentIndex
});
}
};
scope.$watch(
function () { return scope.config; },
function (value) {if (value) {refreshChart();
}},
true
);
scope.$watch(
function () { return scope.option; },
function (value) {if (value) {refreshChart();
}},
true
);
scope.$watch(
function () { return scope.currentIndex; },
function (value) {if (value) {refreshChart();
}},
true
);
// scope.$watch(
// function () { return scope.windowSize; },
// function (value) {
// console.log("directive watch window size");
// if (value) {refreshChart();
//
// }},
// true
// );
},
scope:{
option:'=ecOption',
config:'=ecConfig',
currentIndex: '=ecCurrentIndex'
// windowSize: '=ecWindowSize'
},
restrict:'EA'
}
}]);
For example,in a map (type='china '), when I clicked a province , how can I get the name of the province selected?
anjularjs最低版本要求是多少?
可以在每次实例化的时候,数据还没有返回的时候可以显示loading 这样更友好一点
设置了visualMap 分段式 不同的颜色。 但是在画出来的点线图里, 只有点的颜色是根据visualMap的设定, 线的颜色不变, 始终是缺省颜色。
visualMap: {
top:5,
right:5,
type: 'piecewise',
dimension: 1,
pieces: [
{min: 46, color: 'red'},
{min: 42, max:46, color: 'orange'},
{min: 32, max:38, color: 'green'},
{min: 28, max:32, color: 'orange'},
{max: 28, color: 'red'}
],
outOfRange: {
color: '#999'
},
textStyle: {
color: '#222'
}
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.