342d341 < echo " var selection=null; \n"; 478c477 < echo " function myselectfunctioncca(e) { --- > echo " function myselectfunctioncca() { 481,491c480,481 < //selection = pieChartAfter.getSelection(); < if (e) { pieChartAfter.setSelection([e]); } < selection = pieChartAfter.getSelection()[0]; < if (selection) { < //alert('here'); < if (!selection.row) { ir=selection.row; } < //alert(ir); < if (!selection.column) { ic=selection.column; } < //alert(ic); < } < for (var i = 0; i < 1; i++) { //selection.length; i++) { --- > var selection = pieChartAfter.getSelection(); > for (var i = 0; i < 1; i++) { //selection.length; i++) { 507d496 < //alert(str); 510,511c499,500 < while (message.indexOf(', ' + '[') != -1) { < message=message.replace(', ' + '[',',' + '['); --- > while (message.indexOf(', [') != -1) { > message=message.replace(', [',',['); 513,514c502 < dparts=message.split(',' + '['); < //alert('ir=' + ir + ' ic=' + ic + ' str=' + str + ' dparts.length=' + dparts.length + ' relevant first is ' + dparts[1] + ' second last is ' + dparts[eval(-2 + dparts.length)] + ' last is ' + dparts[eval(-1 + dparts.length)] + ' message=' + message); --- > dparts=message.split(',['); 521c509 < if ((operc.trim() + ' ').substring(0,1) != '<') { --- > if ((operc + ' ').substring(0,1) != '<') { 557c545 < echo " function myselectfunctionccb(e) { --- > echo " function myselectfunctionccb() { 560,568c548 < if (e) { pieChartBefore.setSelection([e]); } < selection = pieChartBefore.getSelection()[0]; < if (selection) { < //alert('herE'); < if (!selection.row) { ir=selection.row; } < //alert(ir); < if (!selection.column) { ic=selection.column; } < //alert(ic); < } --- > var selection = pieChartBefore.getSelection(); 589,590c569,570 < while (message.indexOf(', ' + '[') != -1) { < message=message.replace(', ' + '[',',' + '['); --- > while (message.indexOf(', [') != -1) { > message=message.replace(', [',',['); 592,593c572 < dparts=message.split(',' + '['); < //alert('ir=' + ir + ' ic=' + ic + ' str=' + str + ' Dparts.length=' + dparts.length + ' relevant first is ' + dparts[1] + ' second last is ' + dparts[eval(-2 + dparts.length)] + ' last is ' + dparts[eval(-1 + dparts.length)] + ' message=' + message); --- > dparts=message.split(',['); 600c579 < if ((operc.trim() + ' ').substring(0,1) != '<') { --- > if ((operc + ' ').substring(0,1) != '<') { 636c615 < echo " function myselectfunction(e) { --- > echo " function myselectfunction() { 639,647c618 < if (e) { chart.setSelection([e]); } < selection = chart.getSelection()[0]; < if (selection) { < //alert('heRe'); < if (!selection.row) { ir=selection.row; } < //alert(ir); < if (!selection.column) { ic=selection.column; } < //alert(ic); < } --- > var selection = chart.getSelection(); 653c624 < ir=ir; --- > ir=ir; 664d634 < // alert(str); 667,668c637,638 < while (message.indexOf(', ' + '[') != -1) { < message=message.replace(', ' + '[',',' + '['); --- > while (message.indexOf(', [') != -1) { > message=message.replace(', [',',['); 670,671c640 < dparts=message.split(',' + '['); < //alert('ir=' + ir + ' ic=' + ic + ' str=' + str + ' DParts.length=' + dparts.length + ' relevant first is ' + dparts[1] + ' second last is ' + dparts[eval(-2 + dparts.length)] + ' last is ' + dparts[eval(-1 + dparts.length)] + ' message=' + message); --- > dparts=message.split(',['); 678c647 < if ((operc.trim() + ' ').substring(0,1) != '<') { --- > if ((operc + ' ').substring(0,1) != '<') { 739a709,710 > //www.rjmprogramming.com.au/PHP/PieChart/pie_chart_diff.php?title=Five%20Most%20Populous%20Countries&onclick=y&width=556&height=347&label=Country&desc=Population%20on%202015,Population%20in%202000&data=,[~China~,1401586609]+,[~India~,1282390303]+,[~United+States+of+America~,322583006]+,[~Indonesia~,252812245]+,[~Brazil~,202033670]&data0=,[~China~,1280428583],[~India~,1042261758],[~United+States+of+America~,284594395],[~Indonesia~,208938698],[~Brazil~,174504898] > 784c755,756 < --- > > 794,796c766,767 < echo "google.visualization.events.addListener(pieChartBefore, 'ready', function() { ready=true; }); \n"; < echo "google.visualization.events.addListener(pieChartBefore, 'onmouseover', myselectfunctionccb); \n"; < echo "google.visualization.events.addListener(pieChartBefore, 'select', myselectfunctionccb); \n"; --- > //echo "google.visualization.events.addListener(pieChartBefore, 'onmouseover', myselectfunctionccb); \n"; > //echo "google.visualization.events.addListener(pieChartBefore, 'select', myselectfunctionccb); \n"; 805,807c776,778 < //if ($GETr != "" && $GETc == "" && (isset($_GET['ccb']) || isset($_POST['ccb']))) echo " pieChartBefore.setSelection([{'row': " . $GETr . ", 'column': null}]); setTimeout(myselectfunctionccb,4100); \n"; < //if ($GETr == "" && $GETc != "" && (isset($_GET['ccb']) || isset($_POST['ccb']))) echo " pieChartBefore.setSelection([{'row': null, 'column': " . $GETc . "}]); setTimeout(myselectfunctionccb,4100); \n"; < //if ($GETr != "" && $GETc != "" && (isset($_GET['ccb']) || isset($_POST['ccb']))) echo " pieChartBefore.setSelection([{'row': " . $GETr . ", 'column': " . $GETc . "}]); setTimeout(myselectfunctionccb,4100); \n"; --- > if ($GETr != "" && $GETc == "" && (isset($_GET['ccb']) || isset($_POST['ccb']))) echo " pieChartBefore.setSelection([{'row': " . $GETr . ", 'column': null}]); setTimeout(myselectfunctionccb,4100); \n"; > if ($GETr == "" && $GETc != "" && (isset($_GET['ccb']) || isset($_POST['ccb']))) echo " pieChartBefore.setSelection([{'row': null, 'column': " . $GETc . "}]); setTimeout(myselectfunctionccb,4100); \n"; > if ($GETr != "" && $GETc != "" && (isset($_GET['ccb']) || isset($_POST['ccb']))) echo " pieChartBefore.setSelection([{'row': " . $GETr . ", 'column': " . $GETc . "}]); setTimeout(myselectfunctionccb,4100); \n"; 813,814c784,785 < echo "google.visualization.events.addListener(pieChartAfter, 'onmouseover', myselectfunctioncca); \n"; < echo "google.visualization.events.addListener(pieChartAfter, 'select', myselectfunctioncca); \n"; --- > //echo "google.visualization.events.addListener(pieChartAfter, 'onmouseover', myselectfunctioncca); \n"; > //echo "google.visualization.events.addListener(pieChartAfter, 'select', myselectfunctioncca); \n"; 822,824c793,795 < //if ($GETr != "" && $GETc == "" && (isset($_GET['cca']) || isset($_POST['cca']))) echo " pieChartAfter.setSelection([{'row': " . $GETr . ", 'column': null}]); setTimeout(myselectfunctioncca,4100); \n"; < //if ($GETr == "" && $GETc != "" && (isset($_GET['cca']) || isset($_POST['cca']))) echo " pieChartAfter.setSelection([{'row': null, 'column': " . $GETc . "}]); setTimeout(myselectfunctioncca,4100); \n"; < //if ($GETr != "" && $GETc != "" && (isset($_GET['cca']) || isset($_POST['cca']))) echo " pieChartAfter.setSelection([{'row': " . $GETr . ", 'column': " . $GETc . "}]); setTimeout(myselectfunctioncca,4100); \n"; --- > if ($GETr != "" && $GETc == "" && (isset($_GET['cca']) || isset($_POST['cca']))) echo " pieChartAfter.setSelection([{'row': " . $GETr . ", 'column': null}]); setTimeout(myselectfunctioncca,4100); \n"; > if ($GETr == "" && $GETc != "" && (isset($_GET['cca']) || isset($_POST['cca']))) echo " pieChartAfter.setSelection([{'row': null, 'column': " . $GETc . "}]); setTimeout(myselectfunctioncca,4100); \n"; > if ($GETr != "" && $GETc != "" && (isset($_GET['cca']) || isset($_POST['cca']))) echo " pieChartAfter.setSelection([{'row': " . $GETr . ", 'column': " . $GETc . "}]); setTimeout(myselectfunctioncca,4100); \n"; 869c840 < if (datasetis == 'data') { ocdata(e); if (targ) { if (targ.innerHTML.length > 0) { ir=wio(data, targ.innerHTML.replace('%','')); myselectfunctioncca(null); } } } else { ocdata0(e); if (targ0) { if (targ0.innerHTML.length > 0) { ir=wio(data0, targ0.innerHTML.replace('%','')); myselectfunctionccb(null); } } } --- > if (datasetis == 'data') { ocdata(e); if (targ) { if (targ.innerHTML.length > 0) { ir=wio(data, targ.innerHTML.replace('%','')); myselectfunctioncca(); } } } else { ocdata0(e); if (targ0) { if (targ0.innerHTML.length > 0) { ir=wio(data0, targ0.innerHTML.replace('%','')); myselectfunctionccb(); } } } 875c846 < var dhi=document.head.innerHTML.replace(/, \[/g, ',' + '[').replace(/ = /g, '='); --- > var dhi=document.head.innerHTML.replace(/, \[/g, ',[').replace(/ = /g, '='); 877c848 < var dps=dhi.substring(ioffset).split(',' + '['); --- > var dps=dhi.substring(ioffset).split(',['); 1028a1000 > //www.rjmprogramming.com.au/PHP/PieChart/pie_chart_diff.php?nojwin=y&title=t&desc=d&onclick=y&data=,[~sleep~,23],[~rest~,77]&data0=,[~sleep~,20],[~rest~,80]&val1=My%2520Daily%2520Activities&val2=Task&val3=Percentage&val4=sleep&val5=23&val6=rest&val7=77&val8=%252C%2520%255B%7Esleep%7E%252C24%255D%2520%252C%2520%255B%7Erest%7E%252C76%255D%2520&OK=OK 1039a1012 > //http://www.rjmprogramming.com.au/PHP/PieChart/pie_chart_diff.php?title=My%20Daily%20Activities&task=Task&nojwinyes=Y&deschuh=Percentage&data=,[~sleep~,23],[~rest~,77]&val1=sleep 1095c1068 < if (xansis.indexOf(',' + '[') != -1) { --- > if (xansis.indexOf(',[') != -1) {