Comments (7)
There is currently a way to achieve a sort of responsiveness by changing the view parameter of the components to the new dimensions on parent resize. The charts are smart enough to adapt to the new dimensions, but there is room for a lot of improvement.
Some of the charts still need work on their layout (Advanced Pie Chart being one of them), as well as all of the charts that have legends.
We are open to any ideas and PR's are welcome.
from ngx-charts.
@yann510 - We haven't started working on it yet.
@marjan-georgiev can you point him in the direction to go about implementing this?
from ngx-charts.
@marjan-georgiev Do you guys have a slack or something ? I have some questions, which I believe would spam this issue.
from ngx-charts.
@yann510 we have a gitter channel: https://gitter.im/swimlane/ng2d3
from ngx-charts.
@yann510 Refactored the code in this commit:
7686e79
I added unsubscribe on chart destroy, as the subscriptions were never being cancelled.
Also modified the behavior:
- If the chart has the view input property set, then the dimensions come from the input property
- If the chart does not have the input property set, the dimensions will come from it's parent container
This was added so that you can still manually override the width/height of the chart, in case you don't want it to fit the parent container.
There is one last thing that needs to be added, but I will open a new issue for it. Sometimes the parent container can be resized without resizing the window. In this case, window.onResize will not fire. We will need to add a manual listener on the charts that can trigger the update from outside.
from ngx-charts.
Awesome !
Some very important details I didn't think about.
Thanks for working with me on this one, definitely looking forward to contributing more.
from ngx-charts.
Hi!!, how to update manually??
from ngx-charts.
Related Issues (20)
- Creating a component directly using ViewContainerRef.createComponent or using a component directly in a template without any parameters will result in the error
- Request of new Line-Pie Combo Chart type
- Calendar Pie Chart
- Custom pie chart label
- Chart rendering will shake when SSR is enabled
- X Axis Orientation
- Heat map If max and min parameters are not passed, the colors of legend and heat grid will be inconsistent. HOT 1
- Mouse misalign with vertical line and tooltip in chart-line while zooming in or out
- Please, migrate (or provide as an alternative) standalone APIs for both components and providers.
- Timeline mini chart of line chart not clipped correctly when min / max value of x / y is set
- Maximum Callstack exceeeded on Pie Chart V: 20.5.0
- Euro symbol is displayed when animations is turned off on advanced pie chart
- Timeline chart type
- NGX-Charts does not seem to support Content-Security-Policies with nonces properly
- Infinite loading when refreshing the page for multi ngx-charts-bar-horizontal HOT 1
- Add valueFormatting parameter for Line Area charts HOT 1
- Is this project still maintained?
- Change geolocation from browser to Mumbai, numerical values are displayed in local language.
- JEST transformIgnorePatterns not working HOT 1
- Bar chart appears to render animation misaligned
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 ngx-charts.