2015-11-19 102 views
0

我不能得到轴的边缘/线条展现出来所示。 我检查canvasjs.com但找不到这个文档中任何事情。轴边界不canvasjs线图

任何想法?

JSiddle

enter image description here

此图表的设置在下面的代码中给出。

HTML

<div id="chartContainer" style="height: 360px; width: 360px;"></div> 

JAVASCRIPT

 var chart = new CanvasJS.Chart("chartContainer",{ 
     theme: "theme2", 


     toolTip: { 
     shared: true 
     }, 
     title:{ 
     text: "", 
     }, 
     axisX: { 
     labelFontSize: 11, 
     labelFontColor: "black", 
     labelFontFamily: "calibri", 
     labelFontWeight: "normal", 
     interval: 10, 
     minimum: 15, 
     maximum: 95, 
     }, 
     axisY: { 
     labelFontSize: 11, 
     labelFontColor: "black", 
     labelFontFamily: "calibri", 
     labelFontWeight: "normal", 
     gridThickness: 0, 
     lineColor: "gray", 
     interval: 20, 
     minimum: 170, 
     maximum: 400, 
     }, 

     data: [ 
      { 
       type: "line", 
       //axisYType: "secondary", 
       name: "Downloads", 
       lineThickness: 2, 
       //showInLegend: true, 
       name: "downloads", 
       markerType: "none", 
       dataPoints: [ 
       { x: 46, y: 170 }, 
       { x: 40, y: 353 }, 
       { x: 47, y: 397 }, 
       { x: 47, y: 397 }, 
       { x: 57, y: 396 }, 
       { x: 92, y: 353 }, 
       { x: 70, y: 170 }, 
       ] 
      }, 

      {   
       type: "line", 
       markerType: "none", 
       //showInLegend: true, 
       lineThickness: 2, 
       name: "visits", 
       dataPoints: [ 
       { x: 39, y: 170 }, 
       { x: 35, y: 255 }, 
       { x: 27, y: 262 }, 
       { x: 17, y: 355 }, 
       { x: 25, y: 392 }, 
       { x: 57, y: 396 }, 
       { x: 92, y: 353 }, 
       { x: 70, y: 170 }, 
       ] 
      }, 
      {   
       type: "line", 
       //showInLegend: true, 
       markerType: "cross", 
       name: "Unique Visits", 
       lineThickness: 2, 
       dataPoints: [ 
       { x: 60, y: 280 }, 
       ] 
      }, 
      ], 

     }); 

chart.render(); 
+0

任何人........? – Ethannn

回答

3

ethannn,

这似乎是在“THEME2“的错误。 “THEME1“似乎是工作的罚款。

在“THEME2“你可以通过设置lineThickness as shown here解决此问题。

axisX:{ 
     lineThickness: 2 
    }, 
axisY:{ 
     lineThickness: 2 
    }