1'use strict'; 2 3var QualityGraphUtility = (function () { 4 var baseApiUrl = "http://localhost:88/api/values/"; 5 var charInfo = null; 6 var chartTypes = { 7 LineChart: 1, 8 DonutChart: 2, 9 PieChart: 3 10 }; 11 12 var color = { 13 DarkGray: '#8F8F8F', 14 LightGray: '#D1D1D1', 15 Backgroud: '#FFFFFF', 16 primary: '#0194d3', 17 secondery: '#b2b2b2' 18 }; 19 20 var chartOptions = { 21 BarChartOptions: { 22 backgroundColor: color.Backgroud, 23 colors: ['#0194d3', '#b2b2b2'], 24 // pointSize: 3, 25 hAxis: { 26 textStyle: { color: color.DarkGray } 27 }, 28 vAxis: { 29 gridlines: { color: color.LightGray, count: 10 }, 30 textStyle: { color: color.DarkGray }, 31 baselineColor: color.DarkGray, 32 minValue: 0 33 }, 34 legend: { position: 'bottom' }, 35 height : 400 36 37 }, 38 LineChartOptions: { 39 backgroundColor: color.Backgroud, 40 colors: ['#0194d3', '#b2b2b2'], 41 pointSize: 3, 42 hAxis: { 43 textStyle: { color: color.DarkGray } 44 }, 45 vAxis: { 46 gridlines: { color: color.LightGray, count: 10 }, 47 textStyle: { color: color.DarkGray }, 48 baselineColor: color.DarkGray, 49 minValue: 0.000, 50 format: '0.000' 51 52 }, 53 legend: { position: 'bottom' }, 54 height : 400 55 56 }, 57 ComboChartOptions: { 58 backgroundColor: color.Backgroud, 59 colors: ['#0d3050', '#b2b2b2'], 60 curveType: 'function', 61 pointSize: 3, 62 hAxis: { 63 textStyle: { color: color.DarkGray } 64 }, 65 vAxis: { 66 gridlines: { color: color.LightGray, count: 10 }, 67 textStyle: { color: color.DarkGray }, 68 baselineColor: color.DarkGray 69 }, 70 legend: { position: 'bottom', maxLines: 2 }, 71 seriesType: 'bars', 72 series: { 2: { type: 'line', color: '#29a4d8' }, 3: { type: 'line', color: '#f90' } } 73 }, 74 DonutChartOptions: { 75 backgroundColor: { stroke: color.Backgroud, fill: color.Backgroud }, 76 pieSliceBorderColor: color.Backgroud, 77 tooltip: { text: 'value' }, 78 pieHole: 0.6, 79 slices: { 80 0: { color: color.primary }, 81 1: { color: 'transparent' } 82 }, 83 pieSliceText: 'none', 84 //pieStartAngle:180, 85 //title: "", 86 //sliceVisibilityThreshold: .2, 87 legend: { 88 position: "bottom", 89 textStyle: { fontSize: 11 }, 90 } 91 } 92 }; 93 94 var loadGoogleCoreChart = function () { 95 google.charts.load('current', { 'packages': ['corechart'] }); 96 }; 97 98 var loadGaugeChart = function () { 99 google.charts.load('current', { 'packages': ['gauge'] }); 100 }; 101 102 var loadBarChart = function () { 103 google.charts.load('current', { 'packages': ['bar'] }); 104 }; 105 106 var getChartOptions = function (charInfo) { 107 charInfo = charInfo; 108 109 var _maxValue = 0; 110 chartOptions.LineChartOptions.vAxis.maxValue = 0; 111 chartOptions.LineChartOptions.vAxis.format = '#0.000'; 112 chartOptions.BarChartOptions.vAxis.maxValue = 0; 113 chartOptions.BarChartOptions.vAxis.format = '#0.000'; 114 115 if(charInfo && charInfo.isPercentage === '1'){ 116 chartOptions.LineChartOptions.vAxis.maxValue = _maxValue; 117 chartOptions.LineChartOptions.vAxis.format = '#0.000\'%\''; 118 119 chartOptions.BarChartOptions.vAxis.maxValue = _maxValue; 120 chartOptions.BarChartOptions.vAxis.format = '#0.000\'%\''; 121 } 122 123 var newchartOptions = JSON.parse(JSON.stringify(chartOptions)); 124 return newchartOptions; 125 }; 126 127 return { 128 LoadGoogleCoreChart: loadGoogleCoreChart, 129 LoadGaugeChart: loadGaugeChart, 130 LoadBarChart : loadBarChart, 131 BaseApiUrl: baseApiUrl, 132 ChartTypes: chartTypes, 133 GetChartOptions: getChartOptions, 134 Color: color 135 }; 136 137})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.