Highcharts: Pie Chart not properly align upon loading - javascript

so i have a pie chart that's inside an iframe and when the page loads the pie charts are not properly align
Here's an image of it:
But when i uncheck any of the labels it will align properly and even i check it again it stays align properly
the problem is only upon loading the page.
can anyone know why this happens?.
thanks

Related

highcharts not responsive and overlapping on first view

Im having a small issue with my highcharts.
Oddly when i first view the page, the donut chart overlaps with my line chart but when i resize the window or open firebug it comes to its original position.
When i check the firebug console there are no errors related jquery or javascript.
also i have set the container width to 100% but none of the charts are becoming responsive...
Demo : http://vidznet.com/debug/
Can someone tell me why this is happening?

renderEnd not firing on Horizontal Bar Chart [nvd3]

Let me preface with saying I have bar, pie and line charts where renderEnd all works fine.
I'm trying to modify the styling on a horizontal bar chart, which I can do fine either in the callback or renderEnd and the results can be seen in the browser. The problem occurs when resizing the window, all the custom styling is removed and the chart resets.
Testing render end with a simple console.log on all my other charts, the log fires each time the window is resized, as far as I understand renderEnd should, but on my horizontal bar chart this simply isn't the case and it only gets fired when the page loads.
Here's two plunker's of a horizontal bar chart and a vertical bar chart, if you open the console and watch the height (on horizontal) and width (on vertical) you can see that renderEnd only fires on load on the horizontal chart but fires on load and each time the window is resized on the vertical chart.
If anybody could help me out with this I'd greatly appreciate it!
Horizontal Bar Chart:
http://embed.plnkr.co/ua2IGvShEt2zZeyRTZA2/
Vertical Bar Chart:
http://embed.plnkr.co/eMS2abmdegS8hArklKdY/
Thanks.

d3js: zooming to a display bigger than svg size

I have gone through a lot of examples, but just could not find what I am looking for. I have a chart which has 54 little bar charts in it. I want to implement following zooming features:
1) By default, the chart is displayed in a svg container of size 400x400. On clicking the background of the svg container, the whole chart redraws/pops out itself to a bigger display, say 800x800, but without disturbing the other elements in the html page.
2) Each little bar chart has a separate container for itself in the svg. On clicking the bar chart, just that chart expands/pops out in a bigger display while rest of the chart is still of the same size.
How can these two features be implemented ??
Thanks in advance !
I think what you're describing is a modal div (or dialog) on top of your current page. If so, you'll need two copies of your charts. One is the original (400x400) and the other is the modal popover (800x800). Since the popover is a completely separate SVG, it can be zoomed differently (showing all 54 little bar charts or one bar chart).
Popover
The popover should be clipped so, if you're zooming to show one bar chart, the others will not be visible. You can refine it so when one bar chart is clicked, the popover only draws one bar chart at a time.
The popover can be a simple div with a high z-order or a dialog. Here's a jQuery dialog. There are many.
Click handlers
You also need click handlers on each chart group the the main SVG group. Alternatively, you could have one click handler for all the bar charts and calculate when you are over the background or an individual bar chart.
g.on('click' , function(d){ ...do the zoom... });

how to make a div with divs added by javascript completely scrollable

I have a div report_container which is used to display a collection of dynamically generated charts. the charts are drawn using javascript (Yahoo UI library) and they are plotted on divs which are created dynamically using javascript as well ( because the number of charts varies) when I setreport_container styles overflow to scroll, the div scrolls but the charts which were drawn does not scroll at all. Any idea how can I make the charts scroll with the rest of the content?
EDIT: a screenshot from the console .. the highlighted div is the one where one of the charts start and is created by YUI

Two amCharts graphs are not displaying on the same page with jQueryMobile framework on iPad

I am creating a web application using the jQuery Mobile framework for iPad. In my application I need to display some charts, so I am using Javascript amCharts to draw charts.
In my application, on one page, I want to display a line chart, a bar chart and a HTML table. For a time, only one element will display. Either it will be a line chart or a bar chart or an HTML table. So I created three divs and put the charts and the HTML table in each div. I show or hide the divs via a menu selection. Please look at the dummy application.
It is working perfectly in desktop browsers and Android tablets. When I test it on iPad, it is not working. It displays only the first line chart. If I change it to bar chart then it does not display the chart.
I am hiding and showing divs in javascript like this:
document.getElementById('barChartDiv').style.display='block';
document.getElementById('lineChartDiv').style.display='none';
document.getElementById('tableDiv').style.display='none';
So why does the second chart not appear on iPad? Please tell me what I am doing wrong. Is there any issue in jQuery Mobile and amCharts frameworks?
Any web link or source code would be appreciated.
Try to call chart.validateNow() after you change display style of a div.

Categories