WebChart Demos - Business Charts (Pie Chart, Bar Chart and Line Chart)

Links: http://www.dbatools.net/mytools/webchart-chart-demo.html

    In the WebChart features overview page, I show you seven demo, the first three pages are telling you how to display data in table format pages, then next four pages are telling you how to display data in different types of charts. You can create the demo pages after you install it.

    Suppose that we have a summary table of the trade, it contains the monthly summarized trade count of latest two years.

CREATE TABLE TRADE_SUMMARY_MONTHLY
(
  TRADE_MONTH DATE,
  TRADE_COUNT NUMBER(12)
);

    You need to create some text file suffix with WCML, and put them into following directory.

c:\TomcatWebChart\webapps\webchart
/TomcatWebChart/webapps/webchart

    Let's create forth demo (demo4.wcml) with the following lines.

WEBCHART.XSLDOC=xsl/defchart.xsl
WEBCHART.TYPE=PIE
WEBCHART.WIDTH=480
WEBCHART.HEIGHT=240
WEBCHART.QUERY_1=select to_char(trade_month,'yyyy"Q"q') quater , \
      sum(trade_count) count \
  from trade_monthly_summary \
  where to_char(trade_month,'yyyy')='2008' \
  group by to_char(trade_month,'yyyy"Q"q')

    Let's create fifth demo (demo5.wcml) with the following lines.

WEBCHART.XSLDOC=xsl/defchart.xsl
WEBCHART.TYPE=BAR
WEBCHART.WIDTH=480
WEBCHART.HEIGHT=240
WEBCHART.QUERY_1=select to_char(trade_month,'mm') month , \
      trade_count count \
  from trade_monthly_summary \
  where to_char(trade_month,'yyyy')='2008'

    Let's create sixth demo (demo6.wcml) with the following lines.

WEBCHART.XSLDOC=xsl/defchart.xsl
WEBCHART.TYPE=LINE
WEBCHART.WIDTH=480
WEBCHART.HEIGHT=240
WEBCHART.QUERY_1=select to_char(trade_month,'mm') month , \
      trade_count count \
  from trade_monthly_summary \
  where to_char(trade_month,'yyyy')='2008'

    Let's create seventh demo (demo7.wcml) with the following lines.

WEBCHART.XSLDOC=xsl/defchart.xsl
WEBCHART.TYPE=AREA|BAR
WEBCHART.WIDTH=480
WEBCHART.HEIGHT=240
WEBCHART.QUERY_1=select to_char(trade_month,'mm') month , \
      to_char(trade_month,'yyyy') year, \
      trade_count count \
  from trade_monthly_summary \
  order by 1,2
WEBCHART.CROSSTAB_1=ON

    The access the demo pages with the following URLs.

http://localhost:8080/webchart/demo4.wcml
http://localhost:8080/webchart/demo5.wcml
http://localhost:8080/webchart/demo6.wcml
http://localhost:8080/webchart/demo7.wcml

    Display data in different types of chart is very easy in WebChart.

Post a comment

Remember Me?

« Previous | Main | Next »

Powered by
Movable Type 4.25