日期:2014-05-16 浏览次数:20463 次
//#############################################################
836 //#1.单月柱形图和雷达图Model
837 //#2.单月社会存销比,柱形图store
838 //#3.单月社会存销比,柱形图chart
839 //#4.单月社会存销比,雷达图store
840 //#5.单月社会存销比,雷达图chart
841 //#6.单月社会存销比,报表chartPanel
842 //#############################################################
843
844
845 //===========================单月柱形图和雷达图Model============================
846 Ext.define('columnAndRadarModel', {
847 extend: 'Ext.data.Model',
848 fields: [
849 {
850 name: 'xdata'
851 }, //x轴显示
852 {
853 name: 'ydata'
854 } //y轴显示
855 ]
856 });
857 //=============================end======================================
858
859
860
861 //===================================单月社会存销比,柱形图store==============================
862 var singleSaveAndSaleColumnStore = Ext.create('Ext.data.ArrayStore', {
863 model: 'columnAndRadarModel',
864 autoLoad: false,
865 // 设置服务器端映射。
866 proxy: {
867 type: 'ajax',
868 url: 'chart/stock/getChartSocietyStocksAllType',
869 // 定义数据结构
870 reader: {
871 type: 'json',
872 root: 'root'
873 }
874 }
875 });
876 //=======================================end======================================
877
878
879
880 //==================================单月社会存销比,柱形图chart===============================
881 var singleSaveAndSaleColumnChart = Ext.create('Ext.chart.Chart', {
882 width: document.body.clientWidth * 0.5 * 0.3 ,
883 height:document.body.clientHeight * 0.5,
884 xtype: 'chart',
885 style: 'background:#fff',
886 animate: true,
887 theme:'Category1',
888 store: singleSaveAndSaleColumnStore,
889 axes: [{
890 type: 'Numeric',
891 position: 'left',
892 minimum: 0,
893 grid: true,
894 label: {
895 renderer:function(v){
896 return Ext.util.Format.round(v,1);
897 },
898 font: '10px Arial'
899 }
900 }, {
901 type: 'Category',
902 position: 'bottom',
903 fields: ['xdata'],
904 label: {
905 renderer: function(v){
906 return markerMap.get(v);
907 },
908 font: '12px Arial'
909 }
910
911 }],
912 series: [
913 {
914 type: 'column',
915 width: 70,
916 height: 25,
917 axis: 'left',
918 xField: 'xdata',
919 yField: 'ydata',
920 style:{
921 'width':40
922 },
923 tips: {
924