Comments (5)
You must force a chart redraw. I used it like this:
this.cchart.wrapper.setDataTable(this.pieChartData.dataTable);
this.cchart.redraw();
from ng2-google-charts.
yes it works!
from ng2-google-charts.
where do you place these additional lines?
ts:
this.releases=[['Id','Name','Description','Type','Year','Month','Active']];
this.releaseService.getAll().subscribe(
releasesResp=>{
releasesResp.forEach(element => {
this.releases.push([element.release_id,
element.release_name,
element.release_description,
element.release_type_id,
element.year_name+'',
element.month_id,
element.active]);
});
public releasesTableChart = {
chartType: 'Table',
dataTable: this.releases,
options: {
title: 'Releases',
allowHtml: true,
alternatingRowStyle: true,
pageSize:10,
width:'100%'
}
};
html:
<google-chart [data]="releasesTableChart">
mine prints the columns line, but it does not prints the data coming from the Rest API.
from ng2-google-charts.
Please see the demo, it shows how data can be changed programmatically (you need to force a redraw).
from ng2-google-charts.
I have a case where I have to redraw the chart after unhiding the parent div. The chart when drawn in the hidden div seems to have an issue while calculating the width and few other variables. That seems to be the issue with google charts it self.
The draw function works as expected when there is a change in data but it doesn't redraw to adjust the width of columns when there is no change in data. Is there something I can do to redraw/refresh the chart in this context?
from ng2-google-charts.
Related Issues (20)
- 3D support for Bar/Column chart? HOT 1
- chartSelect not emit event when same bar clicked from timeline chart. HOT 1
- Chicken and egg loading issues with Angular 9 + ivy HOT 1
- How to display horizontal bars chart? HOT 1
- Breaks universal ssr when module gets loaded HOT 3
- draw() method on the viewchild. How to use it ? HOT 1
- Not extensible obects HOT 1
- how to convert google chart in pdf format HOT 1
- Number of GoogleChartComponent's are building up on every page with charts reload HOT 3
- How to use mapsApiKey? HOT 1
- object is not iterable (cannot read property Symbol(Symbol.iterator)) on Map HOT 1
- Make this ivy compatible HOT 3
- Compatibility with Angular 10 HOT 1
- [Bug] role: 'style' and role: 'tooltip' not working HOT 1
- ChartType not documented HOT 2
- Upgrade to support Angular 13 HOT 4
- draw error after changing data HOT 1
- Google charts make webapp very slow about graphical rendering HOT 9
- MouseOver and mouseOut don't work with GeoChart type HOT 1
- html tooltips HOT 1
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 ng2-google-charts.