Comments (4)
Yeah hight-responsive
lets you reflow the chart height wise as well. I've included an example in this fiddle.
The basic premise is that hight-responsive
makes the element have no inherent height, so you could either give height to the <highcharts-chart>
element or its parent (by setting <highcharts-chart>
's height to 100%
).
But that will not reflow the chart for you! Since changing an elements height does not trigger an event, thus you still need to manually run the resizeChart()
function on the component as soon as it's parent is loaded and visible.
from highcharts-chart.
Thanks, yes I can see that working so my problem must be something else I'm doing wrong which I can't figure out at the moment. I'm wrapping your highcharts-chart in my own (polymer 2.x) component so I'm no doubt doing something wrong there.
In the meantime I added Polymer.IronResizableBehavior to my component and handle the iron-resize with:
_onResize(e) {
var chart = this.$.chart;
var renderer = this.$.chart.renderer;
if ( renderer.width != this.offsetWidth || renderer.height != this.offsetHeight )
chart._chart.setSize(this.offsetWidth, this.offsetHeight, false );
}
I suppose possibly you could add iron-resize support to highcharts-chart then it would auto adjust height without requiring the manual call to resizeChart()?
from highcharts-chart.
Sure that sounds like a splendid idea! I would however remark that your resize implementation may not be very performance friendly. The difference between reflow()
and setSize()
is very noticeable. I'd recommend the former.
from highcharts-chart.
@lycandroid A polymer 2.0 version of this lib is now completed if you'd like to use that instead. It's under the branch polymer-2.0
!
Branch: polymer-2.0
PR: #24
from highcharts-chart.
Related Issues (20)
- Zoom options HOT 7
- xAxis not doing anything. HOT 1
- Chart not rendering in IE11 HOT 3
- Finalize PlotOptions and ChartOptions HOT 1
- Upgrade to Highcharts v5.0.0 HOT 1
- Real Time Axis Settings HOT 3
- highcharts-chart doesn't render, when included indirectly via another web component HOT 4
- xAxis and yAxis attributes not having effect on chart. HOT 3
- Upgrading to Polymer 2.x HOT 3
- Angular? HOT 3
- Is it possible to create a gauge element with this library? HOT 2
- HighChart content is not getting displayed HOT 4
- Problems using dom-repeat with highcharts HOT 3
- Highchart World Cloud? HOT 3
- Error : Highcharts is not defined HOT 1
- Annotations on highcharts component HOT 6
- Multiple Series Data HOT 2
- Overriding default Highcharts options HOT 6
- ability to set height HOT 5
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 highcharts-chart.