mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 14:14:36 +08:00
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>
37 lines
929 B
HTML
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>
|