Demo entry 6662015

XML

   

Submitted by anonymous on Nov 23, 2017 at 22:32
Language: XML. Code size: 2.5 kB.

<base table="certification.retail.salesdetail_customer"/>
<block name="query_straw_trans_month_div">
  <sel value="xsales>0"/>
  <link table2="uploads.recruiting_xuji_8059ec587ef1bf27a902d5f109a482db" col="sku" col2="sku" cols="sku,description,dept,deptdesc,group,groupdesc,pl,size" suffix="_straw" shift="0"/>
  <willbe name="with_straw" value="sku_straw<>NA"/>
  <sel value="g_or(customer date transid;;with_straw)"/>
  <willbe name="unique_trans" value="g_last1(customer date transid;;)"/>
  <willbe name="yearmonth" value="yrmo(date)" label="Year Month" format="type:monthlongdash4y"/>
  
  <link table2="certification.retail.stores" col="division" col2="division" shift="0"/>
  <tabu breaks="yearmonth" label="Year-Month Tabulation" cbreaks="divisiondesc" clabels="Division">
    <tcol fun="ucnt" name="straw_cnt" source="transid" label="# Straw Trans" weight=""/>
  </tabu>
  <willbe name="month" value="month(yearmonth)" label="Month"/>
  <tabu label="Avg Month Sale" breaks="month" >
  <tcol name="avg_m0" source="m0" fun="avg" label="Avg West Straw Trans"/>
  <tcol name="avg_m1" source="m1" fun="avg" label="Avg North Straw Trans"/>
  <tcol name="avg_m2" source="m2" fun="avg" label="Avg East Straw Trans"/>
  </tabu>
  <sort col="month" dir="up"/>
</block>

<note> Creat Bar Plot</note>
<dynamic>
  <widget class_="graphics" base_="certification.retail.salesdetail_customer" width_="1000" height_="600">
    <insert block="query_straw_trans_month_div"/>
    <graphspec width="900" height="800">
      <chart type="bar" title="Avg Trans with Strawberries by Month/Division">
        <data x="month" y="avg_m0"/>
        <data x="month" y="avg_m1"/>
        <data x="month" y="avg_m2"/>
        <legend pos="bottom"/>
        <axes ylabel="Avg Straw Trans" xlabel="Month"/>
        <ticks xrot="0"/>
      </chart>
      <style titlecolor="#000000" titlesize="18" titlefontfamily="helvetica" 
       titlefontweight="bold" xaxissize="18" xaxisfontfamily="helvetica" 
       xaxislabelsize="18" xaxislabelfontfamily="helvetica" 
       xaxislabelfontweight="bold" yaxissize="18" yaxisfontfamily="helvetica" 
       yaxislabelcolor="#7f7f7f" yaxislabelsize="18" 
       yaxislabelfontfamily="helvetica" yaxislabelfontweight="bold" 
       zaxissize="18" zaxisfontfamily="helvetica" zaxislabelsize="18" 
       zaxislabelfontfamily="helvetica" zaxislabelfontweight="bold"/>
    </graphspec>
  </widget>
</dynamic>

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).