Files
react-native-devtools-frontend/front_end/component_docs/perf_piechart/basic-without-legend.html
T
Peter Marshall 4616d9c1bb components: Rename PieChart2 to PieChart
Completing the replacement of the old PieChart

Change-Id: Icb827fc567ce4945522f882897e1ddd041a17e39
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2352746
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2020-08-27 09:38:35 +00:00

37 lines
929 B
HTML

<!--
Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>PieChart example without a legend</title>
</head>
<body>
<div id="container">
</div>
<script type="module">
import {PieChart} from '../../perf_ui/PieChart.js';
const chart = new PieChart();
document.getElementById('container').appendChild(chart);
chart.data = {
chartName: 'Nice Chart',
size: 110,
formatter: (value) => String(value) + ' %',
showLegend: false,
total: 100,
slices: [
{value: 75, color: 'crimson', title: 'Filling'},
{value: 25, color: 'burlywood', title: 'Crust'}
],
};
</script>
</body>
</html>