我正在使用图表 js 来开发我的饼图。我想像这样创建图例位置。任何人请帮我解决这个问题...
这是我的代码......我实际上想要像图片一样的结果。当我在 html 中使用 css zoom:70% 并且使 javascript 不起作用时我收到错误..
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
</head>
<style type="text/css">
body{ background-color: #1f1d1d; font-family: Roboto, Myriad Pro, Segoe UI;zoom:70%;}
.col-sm-1.content { border: 2px solid #1f1d1d}
</style>
<body>
<div class="col-sm-1 content" style="background-color: #4f4f4f; height:377px;"><br><br><br>
<canvas id="myChartBBC" style="width:375px; height: 375px;"></canvas>
<br>
<p style="text-align:center; color: #fff;font-size: 14px;"><i>Browse by Channel</i></p>
</div>
</body>
<script>
var ctx = document.getElementById('myChartBBC').getContext('2d');
var chart = new Chart(ctx, {
// The type of chart we want …Run Code Online (Sandbox Code Playgroud)我正在使用 python 从维基百科抓取表格。我已完成代码,但在将特定列提取到 CSV 并添加封闭的双撇号时遇到一些问题。
我只想提取以下列名称:
Kode BPS, Nama, Ibu Kota, Populasi, Luas, Pulau.
Run Code Online (Sandbox Code Playgroud)
这是该表的结果:
这是我的代码:
Kode BPS, Nama, Ibu Kota, Populasi, Luas, Pulau.
Run Code Online (Sandbox Code Playgroud) charts ×1
csv ×1
dataframe ×1
javascript ×1
legend ×1
pandas ×1
pie-chart ×1
positioning ×1
python ×1