<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>

I have two different data for charts, I want to join them as one chart. 
Here is my Google Chart code
<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>


<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>

<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>

<script type='text/javascript'>
  google.load('visualization', '1', {'packages':['annotatedtimeline']});
  google.setOnLoadCallback(drawChart);
  setTimeout(function(){drawChart()},1000);

 function drawChart() 
 {
    var data = new google.visualization.DataTable();
    data.addColumn('datetime', 'Aeg');
    data.addColumn('number', 'Vooluandur 1');
    <?php echo $andmed ?>

     var data2 = new google.visualization.DataTable();
    data2.addColumn('datetime', 'Aeg');
    data2.addColumn('number', 'Meeter 1');
    <?php echo $andmed2 ?>


    var joinedData = google.visualization.data.join(data, data2, 'full', [[0, 
0]], [1], [1]);



     console.log(joinedData);


    var options = { 

         thickness: 3, displayExactValues:   true 
,allowRedraw:true,displayAnnotations:false
        };

    var chart = new 
google.visualization.AnnotatedTimeLine(document.getElementById('d3x'));

    chart.draw(joinedData, options);

  }

// Popup window code
function newPopup(url) {
    popupWindow = window.open(
        
url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}
</script>

<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>

<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>


<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>

Seperate charts are like 

<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>


<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>

<https://lh3.googleusercontent.com/-rIK0wK2m3DE/WMuThmam5OI/AAAAAAAAAqM/bFZNgHbnd-4xqVAa6w7tuUF-Ucph_XWUgCLcB/s1600/hYguM.png>


<https://lh3.googleusercontent.com/-z5-B_XXXkSI/WMuTjXY_7CI/AAAAAAAAAqQ/mDSBb7Fpv8YfiTDa9zN_qojvsooeqRtCgCLcB/s1600/Screenshot%2Bfrom%2B2017-03-16%2B13-02-45.png>



When I use join() I get two datas together
<https://lh3.googleusercontent.com/-z5-B_XXXkSI/WMuTjXY_7CI/AAAAAAAAAqQ/mDSBb7Fpv8YfiTDa9zN_qojvsooeqRtCgCLcB/s1600/Screenshot%2Bfrom%2B2017-03-16%2B13-02-45.png>


<https://lh3.googleusercontent.com/-hRHa9O30vLM/WMuTlW12wFI/AAAAAAAAAqU/OXiNqOnlL-QeQbDtWAiSLIdIKL3He0MewCLcB/s1600/Screenshot%2Bfrom%2B2017-03-16%2B16-40-08.png>


But what I want is like this:
<https://lh3.googleusercontent.com/-hRHa9O30vLM/WMuTlW12wFI/AAAAAAAAAqU/OXiNqOnlL-QeQbDtWAiSLIdIKL3He0MewCLcB/s1600/Screenshot%2Bfrom%2B2017-03-16%2B16-40-08.png>

<https://lh3.googleusercontent.com/-4U11PnxYNNg/WMuTnZpSThI/AAAAAAAAAqY/tK2lSpLvN_Yb4FwYYVobHZjhk8PtWm0GQCLcB/s1600/Screenshot%2Bfrom%2B2017-03-16%2B13-02-05.png>


I want them separated in one chart, Is it possible?

-- 
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/b58d18bb-8bd5-4dc6-83ae-d412c506a89b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to