Google chart tools - container is not defined - javascript

I'm using google charts API (google Chart Tools) to draw two charts (a line chart and a barchart) in two separate div called "divChartG" and "divChartD" (respectively for left and right)
I have an error occurring in my console on Firebug (Firefox 12.0) telling "Container is not defined" in format.js (a javascript file from google, directly.)
So, i've checked forums, helps and else, and everybody said "Don't have two divs with the same id" or "Hey, you missed to tell your div to have your id!"
in my javascript file, var firstDiv = "divChartG" and var secdDiv= "divChartD". Then i draw my chart and tell to find and place with a
document.getElementbyId(firstDiv) //(or secdDiv)
When i do
alert(firstDiv);
it totally works!
so i don't understand at all... and that's really frustrating, because i know it will work!
thanks by advance for the help or the reflexion you could bring to me! :)

Related

Autodesk forge dashboard layup turn into blank after it showed for one time

I exactly follow the steps of tutorials from https://learnforge.autodesk.io/#/tutorials/dashboard and the lab lecture from the autodesk https://www.autodesk.com/autodesk-university/class/Learning-Lab-Your-first-Forge-Dashboard-2019#video. And the dashboard successfully showed for the first time. After I refreshed the pages for several times, the pie chart and bar chart disappeared, leaving the blank area. I repeated the same procesures again and still shows no dashboard.the layup
Can somebody please tell the reason? Thank you.
Assuming that you haven't modified the source code in any way, there are many different reasons why the sample could break, for example, the server we download the charting library from could be temporarily down. Also, if you changed the size of the window, the charts could be below the viewer.
As Augusto mentioned in his comment, if you can still reproduce the issue with the sample code without any modifications, please check the browser console to see if there are any errors.

Chart JS Tooltip - place it in a fixed location outside the canvas

I did a search and could not find an exact answer and I'm a bit of a newbie with ChartJS.
Right now I've got a chart that draws a vertical line on top of a line using an added plugin to ChartJS. My thought now is that I'm looking to make it so that the tooltip's value displays elsewhere not on the canvas. Pretty much I'm trying to recreate a Robinhood like experience.
I have the line and tracking already created. My only issue is that I want to have some text that displays the tooltip value and changes for each point. The red circle is what I'm looking to simulate for the tooltip. Instead of having it appear at the point, it should be fixed at a location and of course change values depending on the point.
I think I've read somewhere there is a method that can be used for ChartJS called getPointsAtEvent, but I'm not exactly sure how to properly use this, but if someone could help me, I'd be really grateful.
I got it to work out using customToolTips and using the tooltip.dataPoints.length. One issue I had when going through this though was that an error appears in the console when you go out of the canvas area, but doesn't stop anything from working.
I'm not exactly how to fix this one, but if anyone has encountered it, please let me know:
(http://localhost:3000/Chart.js:10917:4)
dashboard:178 Uncaught TypeError: Cannot read property 'style' of null
at ChartElement.customTooltips (dashboard:178)
at ChartElement.update (Chart.js:8660)
at ChartElement.handleEvent (Chart.js:8952)
at Chart.eventHandler (Chart.js:4679)
at listener (Chart.js:4609)
at HTMLCanvasElement.proxies.(anonymous)

Expected length error in Ractive/Paths.js demo

I'm trying out a simplified version of the pie chart demo from Paths.js' website at http://andreaferretti.github.io/paths-js-demo/, to understand how it works when used with Ractive. I have most of it working locally, except for one error that I've not been able to resolve.
A working demo is at https://codepen.io/alexlibby/pen/xjvOvQ - I am trying to get the country names and population figures to display over the relevant segment in the pie chart. At the moment, it is showing an error in the browser console, and that country names / population figures are not shown:
Error: <text> attribute x: Expected length, "{pie.sector.centroid[0]}"
I've researched what I think could be the issue (in that the value being passed to the centroid attribute is incorrect), but I'm struggling to understand what it should be. I've checked on SO and can't find anyone with a similar issue.
I'm also using a more recent version of Ractive and the Path.js Pie plugins - is it possible that this could be causing an issue? I have used Browserify to assemble the Node dependencies into one file - my source code starts on around line 5 in the JS section, and finishes at line 26.
Could someone please help point me in the right direction?
You have to use mustaches instead of single braces: x={{pie.sector.centroid[0]}} y={{pie.sector.centroid[1]}}

Getting HighStock javascript chart to show the latest tooltip on load

I'm using the javascript chart from highcharts.com called HighStock for one of my online solutions and the client asked me if there is any way of getting it to show the tooltip for the latest data-point when the graph has been loaded.
I have searched high and low on google, here on stackoverflow and also created a topic about this on their support forum a week ago (no replies yet, though), but I can't really find anything about it. Of course, I have tried to find a solution for this myself, but without any luck.
So, if there anyone out there, that knows how to achieve this? If it is possible at all? :-)
Thanks a lot in advance.
Now with fiddler link: http://jsfiddle.net/L2TFd/ This is basically just one of the examples from highsoft themselves since I can't access my webservices from other domains :-)
This is the tooltip of the last point I want to show when graph is done loading:

Missing Google Markers In IE8

I wonder whether someone may be able to help me please with a error that I can't explain.
I was using this page yesterday and the markers were plotted on the map correctly. However, I've gone back in today and the markers have disapeared. I've also tried other files and I've got the same issue.
I know that the co-ordinates are being plotted on the map, because if I select the location in the left hand sidebar, the 'detail map' renders as it should, I've also checked the page with Firefox and the markers are shown.
I've reinstalled Interent Explorer and I've still got this problem. Could someone perhaps tell me please has anyone else come across this or a similar problem, and could someone perhaps please provide some guidnace on what I've done wrong.
Many thanks and kind regards
Your placeholder icon;
icon: 'http://labs.google.com/ridefinder/images/mm_20_green.png',
is a 404 so not displayed.

Categories

Resources