|
@@ -188,23 +188,6 @@
|
|
|
var myChart = echarts.init(document.getElementById('main'));
|
|
|
|
|
|
var option;
|
|
|
-option = {
|
|
|
- xAxis: {
|
|
|
- type: 'category',
|
|
|
- boundaryGap: false,
|
|
|
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: 'value'
|
|
|
- },
|
|
|
- series: [{
|
|
|
- data: [820, 932, 901, 934, 1290, 1330, 1320],
|
|
|
- type: 'line',
|
|
|
- areaStyle: {}
|
|
|
- }]
|
|
|
-};
|
|
|
-
|
|
|
- myChart.setOption(option);
|
|
|
|
|
|
function check_form(){
|
|
|
var qry=document.getElementById('search_query').value;
|
|
@@ -227,8 +210,33 @@ function check_form(){
|
|
|
sitetitle.innerHTML=response.data.Title;
|
|
|
countryrank.innerHTML=response.data.CountryRank.Rank;
|
|
|
category.innerHTML=response.data.Category;
|
|
|
+
|
|
|
+ var key_ary=array();
|
|
|
+ var val_ary=array();
|
|
|
+ for (const [key, value] of Object.entries(response.data.EstimatedMonthlyVisits)) {
|
|
|
+ data_ary.push(key);
|
|
|
+ val_ary.push(key);
|
|
|
+}
|
|
|
+option = {
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ boundaryGap: false,
|
|
|
+ data: data_ary
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ data: val_ary,
|
|
|
+ type: 'line',
|
|
|
+ areaStyle: {}
|
|
|
+ }]
|
|
|
+};
|
|
|
+
|
|
|
+ myChart.setOption(option);
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-
|
|
|
// sitename.innerHTML =response.data
|
|
|
|
|
|
console.log(response.status);
|