Я хочу показать красный цвет, когда View Bag = Неактивно, я использую высокие графики, чтобы показать круговую диаграмму.когда статус активен, он должен быть по умолчанию или синим, когда его статус неактивен, он должен быть красного цвета
![enter image description here](https://i.stack.imgur.com/VP7tZ.png)
код
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Transformers status'
},
tooltip: {
pointFormat: '{series.name} <b>{}</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name} @ViewBag.status</b> {}',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
name: '@ViewBag.status',
colorByPoint: true,
data: [{
name: 'FP N-67.7',
y: 1,
sliced: true,
selected: true
}]
}]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>