absolutely! I did the same thing after finding out the real problem. Well thanks asgallant once again.
On Tue, Jun 25, 2013 at 8:58 PM, asgallant <[email protected]>wrote: > That would indeed cause problems like this. The solution most often used > (and you may have stumbled upon this given the your post below) is to > unhide the div prior to drawing and use a 'ready' event handler for the > chart to hide the div immediately upon finishing drawing. > > > On Tuesday, June 25, 2013 3:03:22 AM UTC-4, Nitin Jaiswal wrote: > >> Hi asgallant, >> >> I have debugged my code rigorously and finally find out the actual >> problem. >> >> Actually what I wanted was that a single div containing pie charts that >> are being created dynamically and by default the are hide. >> >> After loading of page user can show or slide the div by clicking a div. >> >> When I tried to display the content using slideToggle() or show() the >> digits were going outside but when I remove display:none attribute from >> style, it starts working fine. >> >> I think it is a new bug. >> >> I don't find any other way to serve the purpose. Please help me out. >> >> >> On Mon, Jun 24, 2013 at 10:08 PM, asgallant <[email protected]>wrote: >> >>> I tried it out and can't duplicate the issue in any browser: >>> http://jsfiddle.net/**asgallant/6kLQj/<http://jsfiddle.net/asgallant/6kLQj/>. >>> If the fiddle displays properly for you, check your site's CSS to make >>> sure there isn't anything interfering with the chart. >>> >>> >>> On Monday, June 24, 2013 12:01:30 PM UTC-4, Nitin Jaiswal wrote: >>> >>>> Asgallant, here is the javascript: >>>> >>>> >>>> <div style="float:none" id="draw_chart1"></div> <script type=" >>>> text/javascript"> // Load the Visualization API and the piechart >>>> package. google.load("visualization", "1", {packages:["corechart"]}); // >>>> Set a callback to run when the Google Visualization API is >>>> loaded.google.setOnLoadCallback( >>>> **drawC**hart); function drawChart() { >>>> // Create our data table out of JSON data loaded from server. var data >>>> = new google.visualization.**DataTable**({"cols":[{"label":"** >>>> Question",**"type":"string"},{"**label":"**Total >>>> Attempt","type":"number"}],"**ro**ws":[{"c":[{"v":"asd"},{"v":**5}** >>>> ]},{"c":[{"v":"asd"},{"v":7}**]}**,{"c":[{"v":"sdfas"},{"v":2}**]}** >>>> ]}); var options = { is3D: true, width: 700, height: 300, chartArea: >>>> {width:400, height:400, left:9,top:9,bottom:0,right:0} }; // >>>> Instantiate and draw our chart, passing in some options. // Do not >>>> forget to check your div ID var chart = new >>>> google.visualization.PieChart(****document.getElementById('draw_**** >>>> chart1')); chart.draw(data, options); } </script> >>>> >>>> >>>> On Mon, Jun 24, 2013 at 8:12 PM, asgallant <[email protected]>wrote: >>>> >>>>> The PHP code doesn't help me here, can you open the page in a browser, >>>>> view the source, and paste the javascript here? >>>>> >>>>> On Monday, June 24, 2013 1:06:19 AM UTC-4, [email protected] wrote: >>>>>> >>>>>> Hi asgallant, >>>>>> >>>>>> Here is my code... >>>>>> >>>>>> >>>>>> <?php >>>>>> $survey_question = "SELECT id,answer,total_attempt,**questi****onid >>>>>> from survey_answer where `questionid` = $ques_id AND `answer`!='' AND >>>>>> status='1' ORDER BY id ASC"; >>>>>> $answers_result = @mysql_query($survey_question)******; >>>>>> $table = array(); >>>>>> $table['cols'] = array( >>>>>> array('label' => 'Question', 'type' => 'string'), >>>>>> array('label' => 'Total Attempt', 'type' => 'number') >>>>>> ); >>>>>> $rows = array(); >>>>>> while($r = mysql_fetch_assoc($answers_**res****ult)) { >>>>>> //print_r($r); >>>>>> $temp = array(); >>>>>> $temp[] = array('v' => (string) $r['answer']); // you will >>>>>> probably need to transform this into the Date object format >>>>>> $temp[] = array('v' => (int) $r['total_attempt']); // typecast to >>>>>> int, float, whatever - if you don't, it will be interpreted as a string >>>>>> $rows[] = array('c' => $temp); >>>>>> } >>>>>> $table['rows'] = $rows; >>>>>> $jsonData = json_encode($table); >>>>>> //echo $jsonData; >>>>>> ?> >>>>>> <div id="draw_chart<?php echo $questio_print ?>"></div> >>>>>> <script type="text/javascript"> >>>>>> // Load the Visualization API and the piechart package. >>>>>> google.load("visualization", "1", {packages:["corechart"]}); >>>>>> // Set a callback to run when the Google Visualization API is >>>>>> loaded. >>>>>> google.setOnLoadCallback(**drawC****hart); >>>>>> function drawChart() { >>>>>> >>>>>> // Create our data table out of JSON data loaded from server. >>>>>> var data = new google.visualization.**DataTable****(<?php echo >>>>>> $jsonData ?>); >>>>>> var options = { >>>>>> is3D: true, >>>>>> width: 900, >>>>>> height: 300 >>>>>> }; >>>>>> // Instantiate and draw our chart, passing in some options. >>>>>> // Do not forget to check your div ID >>>>>> var chart = new google.visualization.PieChart(****** >>>>>> document.getElementById('draw_******chart<?php echo $questio_print >>>>>> ?>')); >>>>>> chart.draw(data, options); >>>>>> } >>>>>> </script> >>>>>> >>>>>> >>>>>> >>>>>> On Friday, June 21, 2013 9:10:17 PM UTC+5:30, asgallant wrote: >>>>>>> >>>>>>> You can't adjust the placement of the text. If you post code that >>>>>>> replicates the problem, I'll take a look and see if there are any >>>>>>> tricks I >>>>>>> can come up with to end-route the problem. >>>>>>> >>>>>>> On Friday, June 21, 2013 3:25:50 AM UTC-4, [email protected] wrote: >>>>>>>> >>>>>>>> Hello there, >>>>>>>> >>>>>>>> I am facing a very strange problem that the text inside slice is >>>>>>>> going half outside the slice. >>>>>>>> >>>>>>>> Please help me in adjusting the text. >>>>>>>> >>>>>>>> Screenshot attached. >>>>>>>> >>>>>>>> <https://lh3.googleusercontent.com/-HwsVI5HZToQ/UcP_2AU_-AI/AAAAAAAAAAM/jIvyLv-PTL4/s1600/51c3fc98d535cfc546000016.jpeg> >>>>>>>> >>>>>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "Google Visualization API" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/**to >>>>> **pic/google-visualization-**api/**buKfiCbALRU/unsubscribe<https://groups.google.com/d/topic/google-visualization-api/buKfiCbALRU/unsubscribe> >>>>> . >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> google-visualization-api+**unsub**[email protected]. >>>>> To post to this group, send email to google-visua...@**googlegroups.** >>>>> com. >>>>> >>>>> Visit this group at http://groups.google.com/**group** >>>>> /google-visualization-api<http://groups.google.com/group/google-visualization-api> >>>>> **. >>>>> For more options, visit >>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out> >>>>> . >>>>> >>>>> >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Google Visualization API" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/** >>> topic/google-visualization-**api/buKfiCbALRU/unsubscribe<https://groups.google.com/d/topic/google-visualization-api/buKfiCbALRU/unsubscribe> >>> . >>> To unsubscribe from this group and all its topics, send an email to >>> google-visualization-api+**[email protected]. >>> To post to this group, send email to google-visua...@**googlegroups.com. >>> Visit this group at http://groups.google.com/** >>> group/google-visualization-api<http://groups.google.com/group/google-visualization-api> >>> **. >>> For more options, visit >>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>> . >>> >>> >>> >> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "Google Visualization API" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-visualization-api/buKfiCbALRU/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/groups/opt_out.
