Git Product home page Git Product logo

Comments (5)

mppfiles avatar mppfiles commented on May 16, 2024 3

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.

shaozi avatar shaozi commented on May 16, 2024

yes it works!

from ng2-google-charts.

chr1soscl avatar chr1soscl commented on May 16, 2024

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.

gmazzamuto avatar gmazzamuto commented on May 16, 2024

Please see the demo, it shows how data can be changed programmatically (you need to force a redraw).

from ng2-google-charts.

Rithvik-Reddy-zz avatar Rithvik-Reddy-zz commented on May 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.