Comments (3)
Hi @rahulscp,
You do not need to call validateNow()
, instead it is called for you automatically when the chart changes.
If you want to call other methods, the best way is to use the init
event listener which gives you access to the chart:
const makeChart = ({ dataProvider, fillColors } : Configuration) => {
return {
"type": "serial",
"theme": "light",
...
"listeners": [{
"event": "init",
"method": function (x: any) {
x.chart.zoomOut();
}
}]
};
};
from amcharts3-angular2.
Hi, I tried to add 1 more item to the dataset but nothing changed.
Onclick() {
this.data.push({"category": "Module #6",
"segments": [{
"start": 4,
"end": 6,
"color": "#448e4d",
"task": "Gathering requirements"
}, {
"start": 7,
"end": 9,
"task": "Producing specifications"
}, {
"start": 11,
"end": 15,
"task": "Development"
}, {
"start": 16,
"end": 18,
"task": "Testing and QA"
}]})
console.log(this.data);
this.chart.dataProvider = this.data;
}
}
from amcharts3-angular2.
@QuocMinhTran As explained on the main page, if you want to make a change to your chart's configuration, you need to first make a deep copy:
// Make a copy of the existing config
this.chart = JSON.parse(JSON.serialize(this.chart));
// Change the config
this.chart.dataProvider.push(...);
Alternatively you can use a function to generate the configuration and then call that function on every change:
function makeConfig(dataProvider) {
return {
"type": "serial",
"theme": "light",
"dataProvider": dataProvider
...
};
}
// Change the config
this.chart = makeConfig([...]);
The reason this is necessary is because of how Angular2 handles data updates.
from amcharts3-angular2.
Related Issues (20)
- Gantt Chart displays wrong date in small screens
- Exporting of PNG,jpg,pdf,xlsx etc not working in angular 7 HOT 5
- Large data with specified colors for column chart displays different color
- Update dependencies to Angular 8 HOT 1
- Issue using angular universal
- Not able to Change Gantt Chart display view from Monthly to Daily HOT 3
- I don't want ChartScrollbar, I want browser scrollbar to be displayed in amcharts Gantt
- How to add dynamically New Value axis and graph in Angular 6 by using Amchart 3
- Update dependencies to Angular 9 and support Ivy HOT 20
- ERROR TypeError: this.chart.panels[0].addLabel is not a function
- License key integration in live project HOT 1
- this.checkTouchDuration is not a function (pie chart)
- amcharts 2.2.5 not compatible with angular 9.1.13 and HOT 1
- Support for angular version 13 HOT 1
- Support for Angular v14 HOT 1
- Support for Angular v15 HOT 1
- Support for Angular 16 HOT 1
- Feature Request - Angular 17 upgrade HOT 1
- Amcharts isn't loading when I have no internet connection HOT 4
- Not rendering on Angular Material Tabs HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amcharts3-angular2.