30 lines
834 B
Plaintext
30 lines
834 B
Plaintext
|
@model System.ValueTuple<int,int>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
window.onload = function () {
|
||
|
var chart = new CanvasJS.Chart("chartContainer", {
|
||
|
theme: "theme2",
|
||
|
animationEnabled: true,
|
||
|
title: {
|
||
|
text: "Соотношение кол-ва изделий и поделок"
|
||
|
},
|
||
|
|
||
|
data: [
|
||
|
{
|
||
|
// change type to bar, line, area, pie, etc.
|
||
|
type: "pie",
|
||
|
dataPoints: [
|
||
|
{ label: "Изделия", y: @Model.Item1 },
|
||
|
{ label: "Поделки", y: @Model.Item2 },
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
});
|
||
|
chart.render();
|
||
|
};
|
||
|
</script>
|
||
|
<body>
|
||
|
<div id="chartContainer">
|
||
|
</div>
|
||
|
|
||
|
</body>
|