|
@@ -217,6 +217,14 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <div class="card card__notHover">
|
|
|
|
+ <div id="main" class="chart"></div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
<footer class="footer text-center p-4 bg-white">
|
|
<footer class="footer text-center p-4 bg-white">
|
|
<div class="text-muted"> © 2021 Copyright: Googo Website Traffic</div>
|
|
<div class="text-muted"> © 2021 Copyright: Googo Website Traffic</div>
|
|
</footer>
|
|
</footer>
|
|
@@ -276,13 +284,36 @@
|
|
dataOBJ = { 'keyword': $('#search_query').val() }
|
|
dataOBJ = { 'keyword': $('#search_query').val() }
|
|
// alert(dataOBJ)
|
|
// alert(dataOBJ)
|
|
objstr = JSON.stringify(dataOBJ);
|
|
objstr = JSON.stringify(dataOBJ);
|
|
- console.log(objstr)
|
|
|
|
|
|
+ console.log(objstr);
|
|
$.get("http://api.ptt.cx:8080/keyword/"+$('#search_query').val(), function (result) {
|
|
$.get("http://api.ptt.cx:8080/keyword/"+$('#search_query').val(), function (result) {
|
|
|
|
|
|
console.log(result);
|
|
console.log(result);
|
|
- $('#globalrank').html(result.msearch)
|
|
|
|
- $('#countryrank').html(result.msearch)
|
|
|
|
- $('#category').html(result.msearch)
|
|
|
|
|
|
+ $('#globalrank').html(result.msearch);
|
|
|
|
+ $('#countryrank').html(result.msearch);
|
|
|
|
+ $('#category').html(result.msearch);
|
|
|
|
+
|
|
|
|
+ option = {
|
|
|
|
+tooltip: {
|
|
|
|
+ trigger: 'axis'
|
|
|
|
+},
|
|
|
|
+xAxis: {
|
|
|
|
+ type: 'category',
|
|
|
|
+ boundaryGap: false,
|
|
|
|
+ data: key_ary
|
|
|
|
+},
|
|
|
|
+yAxis: {
|
|
|
|
+ type: 'value'
|
|
|
|
+},
|
|
|
|
+series: [{
|
|
|
|
+ data: val_ary,
|
|
|
|
+ type: 'line',
|
|
|
|
+ areaStyle: {},
|
|
|
|
+
|
|
|
|
+}]
|
|
|
|
+};
|
|
|
|
+myChart.setOption(option);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
// alert(result.competition)
|
|
// alert(result.competition)
|
|
|
|
|