atribuir valor a "value"
Bom dia, estou querendo atribuir um valor em um determinado lugar "value" = "4" mas esse valor atribuido "4" é variavel e pego esse valor de uma url mas essa url me traz mais q somente o valor entao preciso tratar os dados recebidos por essa url e setar o valor no campo "value".
nao sei se consegui explicar o que realmente quero. vou anexar codigos e comentar tambem para ver se voces me ajuda
sou curioso, tentando aprender um pouco de programação
Link informçoes uteis a respeito do codigo abaixo
<html>
<head>
<title>My first chart using FusionCharts Suite XT</title>
<script type="text/javascript" src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script type="text/javascript" src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js?cacheBust=56"></script>
<script type="text/javascript">
FusionCharts.ready(function(){
var fusioncharts = new FusionCharts({
type: 'thermometer',
renderAt: 'chart-container',
id: 'myThm-2',
width: '240',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Temperature Monitor",
"subcaption": " Central cold store",
"lowerLimit": "-5",
"upperLimit": "50",
"numberSuffix": "°C",
"decimals": "1",
"showhovereffect": "1",
"thmFillColor": "#008ee4",
"showGaugeBorder": "1",
"gaugeBorderColor": "#008ee4",
"gaugeBorderThickness": "2",
"gaugeBorderAlpha": "30",
"thmOriginX": "100",
"dataStreamURL": "https://api.thingspeak.com/channels/133640/feed/last.json?api_key=IWT803SUTJP5WILF/", //contem dados q preciso "LIMPAR" E ATRIBUIR A VALUE
"refreshInterval": "5",
"theme": "fint"
},
"value": "35" //ESSE VALUE DEVE RECEBER O DE dataStreamURL ja limpo, somente numero
}
}
);
fusioncharts.render();
});
</script>
</head>
<body>
<div id="chart-container">FusionCharts XT will load here!</div>
</body>
</html>Discussão (1)
Carregando comentários...