Dear sir,

I tried to create chart using the following data source:

select period_month, Energy_Usage from ( select 'JAN' as period_month, JAN AS Energy_Usage, 1 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'FEB' as period_month, FEB AS Energy_Usage, 2 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'MAR' as period_month, MAR AS Energy_Usage, 3 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'APR' as period_month, APR AS Energy_Usage, 4 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'MAY' as period_month, MAY AS Energy_Usage, 5 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'JUN' as period_month, JUN AS Energy_Usage, 6 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'JUL' as period_month, JUL AS Energy_Usage, 7 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'AUG' as period_month, AUG AS Energy_Usage, 8 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'SEP' as period_month, SEP AS Energy_Usage, 9 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'OCT' as period_month, OCT AS Energy_Usage, 10 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'NOV' as period_month, NOV AS Energy_Usage, 11 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 union select 'DEC' as period_month, DEC AS Energy_Usage, 12 as SEQ_NO from EN_ENERGY_BENCHMARK_O where branch_id = 'SBA' and period_year=2014 and FLAG_HEADER='Y' and seqno=5 ) temp order by seq_no

and the following panel:

<panel> <xylayout> <cell x="10" y="10" width="500" height="500"> <categorychart title="Energy Usage" backgroundcolor="#81FF54" plotbackgroundcolor="#C1CBFF"> <subtitle text="Year 2014"/> <linerenderer datasource="emsEnergyUsage1" categorycolumn="PERIOD_MONTH"> <line valuecolumn="ENERGY_USAGE" legendlabel="Energy Usage"/> </linerenderer> <rangeaxis label="Energy Usage" position="Left" default="Y"/> <legend position="Bottom"/> </categorychart> </cell> </xylayout> </panel>

The table is:

CREATE TABLE EMS.EN_ENERGY_BENCHMARK_O ( BRANCH_ID VARCHAR2(5 BYTE), PERIOD_YEAR CHAR(4 BYTE), FLAG_HEADER CHAR(1 BYTE), FLAG_PUBLIC_AREA CHAR(1 BYTE) DEFAULT 'N', SEQNO NUMBER(2), UTIL_CONS VARCHAR2(50 BYTE), JAN NUMBER(17,2) DEFAULT 0, FEB NUMBER(17,2) DEFAULT 0, MAR NUMBER(17,2) DEFAULT 0, APR NUMBER(17,2) DEFAULT 0, MAY NUMBER(17,2) DEFAULT 0, JUN NUMBER(17,2) DEFAULT 0, JUL NUMBER(17,2) DEFAULT 0, AUG NUMBER(17,2) DEFAULT 0, SEP NUMBER(17,2) DEFAULT 0, OCT NUMBER(17,2) DEFAULT 0, NOV NUMBER(17,2) DEFAULT 0, DEC NUMBER(17,2) DEFAULT 0 )

When I run the program, it does not display the chart. What error with the code?

Thanks for the help. Suputra.

asked 12 Feb '15, 06:54

suputra's gravatar image

suputra
115
accept rate: 0%


Problem solved

link

answered 13 Feb '15, 02:12

suputra's gravatar image

suputra
115
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2

Asked: 12 Feb '15, 06:54

Seen: 760 times

Last updated: 13 Feb '15, 02:12


© Copyright Gerger 2017