Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in Stacked mode,echarts does not calculate y axis properly. chart is going out of bound #8520

Closed
adityaU opened this issue Jun 13, 2018 · 3 comments

Comments

@adityaU
Copy link

adityaU commented Jun 13, 2018

One-line summary [问题简述]

in Stacked mode,echarts does not calculate y axis properly. chart is going out of bound

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.1.0
  • Browser version [浏览器类型和版本]: Google Chrome Version 66.0.3359.181 (Official Build) (64-bit)
  • OS Version [操作系统类型和版本]: Mac OSX 10.12

Expected behaviour [期望结果]

in Stacked mode,echarts should calculate y axis properly. chart should not go out of bound

ECharts option [ECharts配置项]

option = {  
   "backgroundColor":"#fff",
   "legend":{  
      "orient":"horizontal",
      "x":"center",
      "left":"2%",
      "top":"2%"
   },
   "textStyle":{  
      "fontFamily":"Lato"
   },
   "tooltip":{  
      "show":true,
      "trigger":"axis",
      "backgroundColor":"#fff",
      "borderColor":"#e0e5ec",
      "borderWidth":1,
      "textStyle":{  
         "color":"#495057",
         "fontSize":10
      },
      "enterable":true,
      "axisPointer":{  
         "lineStyle":{  
            "color":"#e0e5ec"
         }
      }
   },
   "toolbox":{  
      "feature":{  
         "dataZoom":{  
            "show":true,
            "title":{  
               "zoom":"Zoom",
               "back":"Restore Zoom"
            }
         }
      }
   },
   "color":[  
      "rgba(101,116, 205, 0.9 )",
      "rgba(246,109, 155, 0.9 )",
      "rgba(43,203, 186, 0.9 )",
      "rgba(253,150, 68, 0.9 )",
      "rgba(205,32, 31, 0.9 )",
      "rgba(165,94, 234, 0.9 )",
      "rgba(123,210, 53, 0.9 )",
      "rgba(241,196, 15, 0.9 )",
      "rgba(70,127, 207, 0.9 )",
      "rgba(23,162, 184, 0.9 )",
      "rgba(69,170, 242, 0.9 )",
      "rgba(94,186, 0, 0.9 )",
      "rgba(33,150, 243, 0.9 )",
      "rgba(0,150, 136, 0.9 )",
      "rgba(244,67, 54, 0.9 )",
      "rgba(156,39, 176, 0.9 )",
      "rgba(0,150, 136, 0.9 )",
      "rgba(103,58, 183, 0.9 )",
      "rgba(63,81, 181, 0.9 )",
      "rgba(76,175, 80, 0.9 )",
      "rgba(233,30, 99, 0.9 )",
      "rgba(96,125, 139, 0.9 )",
      "rgba(255,87, 34, 0.9 )",
      "rgba(28,147, 99, 0.9 )",
      "rgba(255,113, 91, 0.9 )",
      "rgba(43,89, 195, 0.9 )",
      "rgba(33,91, 86, 0.9 )",
      "rgba(0,188, 212, 0.9 )",
      "rgba(255,87, 34, 0.9 )",
      "rgba(255,193, 7, 0.9 )",
      "rgba(48,25, 102, 0.9 )",
      "rgba(211,101, 130, 0.9 )",
      "rgba(130,6, 70, 0.9 )",
      "rgba(100,155, 193, 0.9 )",
      "rgba(75,63, 114, 0.9 )",
      "rgba(219,51, 64, 0.9 )",
      "rgba(223,81, 76, 0.9 )",
      "rgba(92,45, 80, 0.9 )",
      "rgba(94,52, 72, 0.9 )",
      "rgba(83,187, 244, 0.9 )",
      "rgba(89,196, 197, 0.9 )",
      "rgba(191,240, 115, 0.9 )",
      "rgba(228,95, 86, 0.9 )",
      "rgba(201,27, 38, 0.9 )",
      "rgba(115,116, 149, 0.9 )",
      "rgba(92,45, 80, 0.9 )",
      "rgba(32,69, 124, 0.9 )",
      "rgba(15,89, 89, 0.9 )",
      "rgba(159,146, 170, 0.9 )",
      "rgba(255,162, 0, 0.9 )",
      "rgba(36,168, 172, 0.9 )",
      "rgba(255,76, 101, 0.9 )",
      "rgba(233,76, 111, 0.9 )",
      "rgba(53,68, 88, 0.9 )",
      "rgba(105,210, 231, 0.9 )",
      "rgba(220,39, 66, 0.9 )",
      "rgba(58,2, 86, 0.9 )",
      "rgba(23,166, 151, 0.9 )",
      "rgba(6,71, 137, 0.9 )",
      "rgba(255,195, 60, 0.9 )"
   ],
   "xAxis":{  
      "show":true,
      "type":"category",
      "name":"Inserted_at By Day",
      "nameLocation":"center",
      "nameTextStyle":{  
         "padding":8,
         "color":"#495057",
         "fontSize":12
      },
      "axisLine":{  
         "onZero":false,
         "lineStyle":{  
            "color":"#e0e5ec"
         }
      },
      "axisLabel":{  
         "color":"#495057",
         "fontSize":10
      },
      "splitLine":{  
         "show":false
      }
   },
   "yAxis":{  
      "show":true,
      "type":"value",
      "name":false,
      "nameLocation":"center",
      "nameTextStyle":{  
         "padding":8,
         "color":"#495057",
         "fontSize":12
      },
      "axisLine":{  
         "onZero":false,
         "lineStyle":{  
            "color":"#e0e5ec"
         }
      },
      "axisLabel":{  
         "color":"#495057",
         "fontSize":10
      },
      "splitLine":{  
         "show":false
      }
   },
   "series":[  
      {  
         "type":"bar",
         "name":"count",
         "itemStyle":null,
         "stack":true,
         "data":[  
            [  
               "2018-03-08 05:30:00.000",
               156
            ],
            [  
               "2018-03-23 05:30:00.000",
               24
            ],
            [  
               "2018-04-18 05:30:00.000",
               513
            ],
            [  
               "2018-05-16 05:30:00.000",
               7
            ],
            [  
               "2018-05-20 05:30:00.000",
               21
            ],
            [  
               "2018-05-31 05:30:00.000",
               7
            ],
            [  
               "2018-06-07 05:30:00.000",
               7
            ],
            [  
               "2018-06-08 05:30:00.000",
               2
            ],
            [  
               "2018-06-10 05:30:00.000",
               6
            ]
         ]
      },
      {  
         "type":"bar",
         "name":"?column?",
         "itemStyle":null,
         "stack":true,
         "data":[  
            [  
               "2018-03-08 05:30:00.000",
               9
            ],
            [  
               "2018-03-23 05:30:00.000",
               "1"
            ],
            [  
               "2018-04-18 05:30:00.000",
               356
            ],
            [  
               "2018-05-16 05:30:00.000",
               5
            ],
            [  
               "2018-05-20 05:30:00.000",
               15
            ],
            [  
               "2018-05-31 05:30:00.000",
               5
            ],
            [  
               "2018-06-07 05:30:00.000",
               5
            ],
            [  
               "2018-06-08 05:30:00.000",
               "1"
            ],
            [  
               "2018-06-10 05:30:00.000",
               4
            ]
         ]
      }
   ]
}

Other comments [其他信息]

https://www.dropbox.com/s/my8g2tv6e5g9kog/Screenshot%202018-06-13%2018.37.43.png?dl=0

@ghost
Copy link

ghost commented Jun 14, 2018

change the position of the legend

I got the same bug few days ago

@adityaU
Copy link
Author

adityaU commented Jun 14, 2018

tried, did not help. :(

@komorebi-san
Copy link

@adityaU Did you manage to solve the bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants