2013年7月25日星期四

About Highcharts embedding problem extjs

 

Ext.onReady (function () {
var sss = '$ {jsonStr}';
var json1 = $. parseJSON (sss);
var json = eval (json1);
var cg = json.baobiao [0]. orgName;
var liftNum = json.baobiao [0]. liftNum;
var badNum = json.baobiao [0]. badNum;
var failureRate = json.baobiao [0]. failureRate;
var failureTime = json.baobiao [0]. failureTime;
var failure = json.baobiao [0]. failure;
var chart = new Highcharts.Chart ();


var tabs = new Ext.TabPanel ({
renderTo: 'liftFailureReportInfoTb', 

activeTab: 0, 

items: [{
html: '
</ div> ',
afterRender: function () { $ ("# Container"). Highcharts ({ chart: { renderTo: 'container', / / ​​DIV's ID
defaultSeriesType: 'column' / / Display Type: columnar
},
title: { text: 'Report' / / Title
},
xAxis: {/ / X-axis naming
categories: cg,
labels: { formatter: function () { var s = this.value; if (s.length <= 6) { return '


page
 


</ div> </ Body>

front of the variable data from the backstage pass over,
cite some of the main js
jquery-1.4.min.js
highcharts.js
jquery.min.js
page refreshes the data can not be displayed at JS wrong, what 80,020,101 or something, totally do not understand, just getting started with extjs, also requested the god to help look
Ext is version 3.2, highcharts is 2.3.3
------ Solution ------------------------- -------------------
highchart have come out it?
------ For reference only -------------------------------------- -
resolved, is to see the upstairs of the post, but some changes, stickers sharing under the bar
 

var sss = '$ {jsonStr}';
var json1 = $. parseJSON (sss);
var json = eval (json1);
var cg = json.baobiao [0]. orgName;
var liftNum = json.baobiao [0]. liftNum;
var badNum = json.baobiao [0]. badNum;
var failureRate = json.baobiao [0]. failureRate;
var failureTime = json.baobiao [0]. failureTime;
var failure = json.baobiao [0]. failure;
Ext.onReady (function () {
function createReport () 

{
var chart;
chart = new Highcharts.Chart ({
chart: {
renderTo: 'container', / / ​​DIV's ID 

defaultSeriesType: 'column' / / Display Type: columnar 

}, 

title: {
text: 'elevator malfunction report' / / Title 

}, 

xAxis: {/ / X-axis naming 

categories: cg, 

labels: {
formatter: function () {
var s = this.value;
if (s.length <= 6) {
return '

没有评论:

发表评论