If there any solution to this issue please let me know. I still new to using the chart.js and Angular. when I try to pull the graph datasets using API, graph seems hidden until I change the window size. I dont know if Im doig wrong or it is problem in the chart.js module. Please help, thank you.
Chart in Angular not displayed until windows resize
877 Views Asked by Atikah Faudzi At
2
There are 2 best solutions below
Related Questions in ANGULAR
- Is it possible to use ES5 JavaScript with Angular 2 instead of TypeScript?
- Module '"angular2/angular2"' has no exported member 'For'
- import syntax in typescript creating another js file in visual studio
- Separate ts file for imports
- How to use an AngularJS 2 component multiple times in the same page?
- injectables not working in angular 2.0 latest build 26
- Does angular2 bootstrap have a way to dynamically target elements like it does in angular 1.x
- Import {} from location is not found in VS Code using TypeScript and Angular 2
- Angular 2/Typescript: require not found
- ng-switch in Angular2
- Angular 2 import issue: "Zone already exported on window the object!"
- How to make FileReader work with Angular2?
- Writing the most basic Unit test in Angular 2?
- Angular2: Creating child components programmatically
- AngularJS - TypeError: Cannot read property 'canonicalUrl' of undefined
Related Questions in CHART.JS
- Uncaught TypeError: Cannot read property 'draw' of undefined for object scale
- Rails 4.2 jQuery loads only after refresh
- ChartJS plugin with live label update
- Chartjs doughnut segment pattern
- How can i add an image as background in Chartjs?
- how to set color for each item in tooltip with ChartJS
- Calculate Ideal Burndown
- How to print angular-chart
- Use chartjs with rails
- chartjs table each making series not proceeding to next tr
- How to make Chart JS responsive?
- How can I add dataset toggle to Chart.js?
- Chart.js. Values in a big range. The smallest values are not available
- Changing color of specific ChartJS - AngularChartJS point
- How to set global/specific properies when updating line-chart using Chart.js?
Related Questions in ANGULAR9
- Angular 2+ NGXS: state is undefined in directive notwithstanding the state defaults
- Add Tooltip When Ellipsis Directive to Angular Material Select
- Declare(register) a component in a module dynamically when that component is lazy loaded in angular 9
- Can child route path(s) work in an Auxiliary / Secondary route in Angular 9 routing?
- download a file when link clicked in angular 9?
- Is there a #define in angular?
- Format the date in Angular 9 with small letter h at the end of the date
- Firebase Realtime Database: limit SignIn users to write N times / duration
- Angular Material Autocomplete and API Objects
- Changes to the property not appearing in template on real device
- Screen to view time slots for a particular date in Angular
- How to change Row Index Number of p-table on clicking change event of paginator in primeNg
- HammerJS in Angular 9 pinchin pinchout text is not selectable
- In an angular 9 app, what should be more preferred; global styles or component level styles
- Fix angular http upgrade ionic
Related Questions in CHARTJS-2.6.0
- Chartjs some legends are omitted
- How to remove previous piechart and add new piechart in js
- Highlight doughnut segment on mouseenter generateLegend Chartjs 2
- Chart.js : Controller for Scatter chart doesn't work for draw function
- How to add a button to a chart.js graph
- Chart.js multiple columns of data for the same label
- How can I place horizontal gridlines above bars with Chart.js?
- ng2-chart: How to show percentage values inside the chart?
- Get multiple boxes in background in ChartJs
- ChartJs events in Angular
- Chartjs Timestamp to Datetime labels
- Using Chart.js, How can I create a bar chart for several sets of data
- Chartjs Different Fill Color For Overlap Area
- Reverse tick order
- chartjs default background color to columns
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There's a reason why you're seeing that chart after resize because you're nesting your API calls and angular change-detection doesn't work well with nested functions. There're 2 solutions to this problem.
You can flatten your API calls and remove nesting or
you can use changeDetectorRef to trigger the change detection by
use the below statement after your calculation is finished.
this.cdr.markForCheck();
I'd advise you to go for the first option.