Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //************************************************************************************
- // SQL
- //************************************************************************************
- select rvc.NAME, count(*)
- from DOCS d, RVC rvc
- WHERE d.RVC=rvc.RVC_ID and trunc(d.BUSSINES_DATE) = trunc(SYSDATE) and d.RVC!=0 and d.COFIRMATION='T' and d.CHECK_OPEN='F'
- GROUP BY rvc.NAME
- ORDER BY rvc.NAME
- //************************************************************************************
- // JS
- //************************************************************************************
- $(function () {
- var CHART_TITLE = 'Checks by RVC';
- var CHART_DATA = '';
- var CHART_SUBTITLE = '';
- var YAXIS_TITLE = 'pcs';
- var series = [];
- // extract data
- data.forEach(function(item, i, arr) {
- var rvc = item[0],
- val = item[1];
- series.push({
- name: rvc,
- data: [val]
- });
- });
- $('#container').highcharts({
- chart: {
- type: 'column'
- },
- title: {
- text: CHART_TITLE
- },
- subtitle: {
- text: CHART_SUBTITLE
- },
- xAxis: {
- // categories: categories,
- categories: [
- CHART_DATA
- ],
- stackLabels: {
- enabled: true,
- style: {
- fontWeight: 'bold',
- color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
- }
- }
- },
- yAxis: {
- min: 0,
- tickInterval: 1,
- title: {
- text: YAXIS_TITLE
- },
- },
- legend: {
- align: 'center',
- verticalAlign: 'bottom',
- // floating: true,
- backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
- },
- tooltip: {
- headerFormat: '<b>{point.x}</b><br/>',
- pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
- },
- plotOptions: {
- column: {
- dataLabels: {
- enabled: false,
- }
- }
- },
- series: series
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement