我试图在这种情况下删除图表的“传奇”文本“得分列表”左侧的小矩形框。我在文档中找不到任何显示方法的内容。是的,我发现了如何完全删除“传奇”,但这会导致条形图在图表设计中变得过高。这是我有一个示例代码:
<!DOCTYPE html>
<html>
<head>
<title>ChartJS - BarGraph</title>
<style type="text/css">
#chart-container {
width: 300px;
height: 150px;
}
</style>
<!-- javascript -->
<script type="text/javascript" src="jquery-1.11.min.js"></script>
<script type="text/javascript" src="Chart.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
//url: "test.html",
//method: "GET",
success: function(data) {
// test data
var data = [
{
"Serverid":"1",
"score":"37"
},
{
"Serverid":"2",
"score":"60"
},
{
"Serverid":"3",
"score":"35"
},
{
"Serverid":"4",
"score":"41"
},
{
"Serverid":"5",
"score":"50"
},
{
"Serverid":"6",
"score":"70"
},
{
"Serverid":"7",
"score":"70"
},
{
"Serverid":"8",
"score":"70"
},
// ... it …Run Code Online (Sandbox Code Playgroud)