Q1:why markup use ng-controller it will not work?like pic.
Q2:when I use <ma-get-point-value>
get a value.How do I do write into script?
I get point like mypoint. I want this mypoint can be write into script?
series: [{
name: 'windSpeed',
data: [5],<---
all code
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>
<script src="http://code.highcharts.com/modules/solid-gauge.js"></script>
<div style="width: 600px; height: 400px; margin: 0 auto">
<div id="container-speed" style="width: 300px; height: 200px; float: left"></div>
</div>
<ma-get-point-value point-xid="DP_MainDC/AA/LCP1/Fan#1_RPM" point="mypoint"></ma-get-point-value>
<script>
$(function () {
var gaugeOptions = {
chart: {
type: 'solidgauge',
margin: [0, 0, 0, 0],
backgroundColor: 'transparent'
},
title: null,
yAxis: {
min: 0,
max: 30,
minColor: '#009CE8',
maxColor: '#009CE8',
lineWidth: 0,
tickWidth: 0,
minorTickLength: 0,
minTickInterval: 500,
labels: {
enabled: false
}
},
pane: {
size: '100%',
center: ['50%', '50%'],
startAngle: -130,
endAngle: 130,
background: {
borderWidth: 20,
backgroundColor: '#DBDBDB',
shape: 'arc',
borderColor: '#DBDBDB',
outerRadius: '90%',
innerRadius: '90%'
}
},
tooltip: {
enabled: false
},
plotOptions: {
solidgauge: {
borderColor: '#009CE8',
borderWidth: 20,
radius: 90,
innerRadius: '90%',
dataLabels: {
y: -25,
borderWidth: 0,
useHTML: true
}
}
},
series: [{
name: 'windSpeed',
data: [5],
dataLabels: {
format: '<div style="Width: 50px;text-align:center"><span style="font-size:45px;color:#009ce8">{y}</span></div>'
}
}],
credits: {
enabled: false
},
};
// The speed gauge
$('#container-speed').highcharts(gaugeOptions);
// Tweak SVG
var svg;
svg = document.getElementsByTagName('svg');
if (svg.length > 0) {
var path = svg[0].getElementsByTagName('path');
if (path.length > 1) {
// First path is gauge background
path[0].setAttributeNS(null, 'stroke-linejoin', 'round');
// Second path is gauge value
path[1].setAttributeNS(null, 'stroke-linejoin', 'round');
}
}
});
</script>