Hi Team,
Any updates.
Thank
Ajeet
On Tuesday, 14 August 2018 10:55:25 UTC+4, Ajit Kr Gupt wrote:
>
> Dear Team,
>
> We have tried to bind the google chart in IBM Domino Xpages application.
> But Unable to view the chart. Below is the code.
>
> I taken on input field and in this field set the values and trying to take
> the values from javascript like
> document.getElementById("#{id:txtValues}").value. but didn't get the values.
>
> Same details we can put on button click and prompt the alert values are
> coming properly. But in your script getting issues and values coming blank.
>
> *Please help to us*
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xp:view xmlns:xp="http://www.ibm.com/xsp/core">
> <script type="text/javascript" src="
> https://www.gstatic.com/charts/loader.js"></script>
> <xp:inputText id="txtValues">
> <xp:this.defaultValue><![CDATA[#{javascript:"['Opportunity
> Details', 'Total Values'],['Work', 21],['Eat', 12],['Commute',
> 22],['Watch TV', 32],['Sleep', 57]"}]]></xp:this.defaultValue>
> </xp:inputText>
> <div id="piechart" style="width: 900px; height: 500px;"></div>
>
> <script type='text/javascript' src='https://www.google.com/jsapi'></script>
>
> <script>
> google.charts.load('current', {'packages':['corechart']});
> google.charts.setOnLoadCallback(drawChart);
>
> function drawChart() {
> var data = google.visualization.arrayToDataTable([
>
>
> document.getElementById("#{id:txtValues}").value
>
>
> ]);
>
> var options = {
> title: 'Opportunity Details'
> };
>
> var chart = new
> google.visualization.PieChart(document.getElementById('piechart'));
>
> chart.draw(data, options);
> }
>
> </script>
>
> </xp:view>
>
--
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/4e4aaafc-a3fa-4036-9334-185baf891676%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.