01 |  
02 | ** ****************************************************************************************** *
03 | ** MANDRAGORE PLANETE  
04 | *** *******************************************************************************************
05 | #include  "#SYSPATHMS4BI+\zInclude\includeChart.h"
06 | text : LocalServerDB :="#WWWMS4BISERVER+\Ms4BI-DemoUnicodeCube.db"; 
07 | 
08 |     <div  $IsVisible_lg :  /* visible only large (screen) */
09 |         DrawWindow : "Win2" , actions : $WinCustom +  $WinMinimize + $WinMaximize + $WinClose  , position : 1150,  50,500,1050  TITLE : "  Window Web: MS4 script Rapid Developt" 
10 |                                       url :  UrlMs4Script  /* key word ms4script */
11 |       >;
12 |  Begin_Block_Rwd  :  full_page  
13 |  <Rwd_Row :  1
14 |  <Rwd_Col : sm:12,md:12,lg:12 :  
15 |      
16 |             <notification : $Bts_Notif_success_Dismissable ,  " ###b Step 6  :  Pie Bar.. Charts  Win&Web ###b ">  
17 |         
18 | >>;     
19 | ** ************************************************************
20 | ** DISPLAY PIE CHART
21 | ** ***********************************************************    
22 |  
23 |  DBconnect {Ms4DB} (LocalServerDB) ;
24 |   
25 |     <Rwd_Row + "bg-gray"  :  1 /* 1 : optional */
26 |             <Rwd_Col :   5F0;">lg:5 ,"text-left" :  
27 |                 <div $widget + $bg_primary + "no-padding" :
28 |                        <div  "class='p-m " :
29 |                         <Text : ""     , "     #  Population by Province #  " > 
30 |                                     
31 |                         <Text :  ""    , "    ###b   ( PIE ) ###b " >  
32 |                        <Text :  ""     , "  --China--   " >  
33 |                       >, /* end div */
34 |                            
35 |                             FormMorris :  DrawPIE ,  title :"" , 
36 |                             TYPE : $STANDARD, FORMAT: "pers"  use View  ("[ms4TotalPopulByProvince]")  ,               
37 |                 >  /* end div */
38 |               >  /* end col lg:6 */
39 |               <Rwd_Col :   lg:7 ,"text-left" :  
40 |                 <div $widget + $bg_info + "no-padding" :
41 |                        <div  "class='p-m " :
42 |                         <Text : ""     , "     #  Population by Province #   " >  
43 |                                     
44 |                         <Text :  ""    , "    ###b  (bar )###b " > 
45 |                        <Text :  ""     , "  --China--   " >  
46 |                       >, /* end div */
47 |                       DBconnect{Ms4DB}(LocalServerDB),
48 |                         Ms4_query{ms4db}  option : into  $MS4DBTMP 
49 |                        (" SELECT  province,    TOTALThousandpopulationbyProvince" +
50 |                         " from  [ms4TotalPopulByProvince]  order by TOTALthousandPopulationByProvince  " ) ,  
51 |                            DBconnect{Ms4DB}($MS4DBTMP),
52 |                              setting : chart : legend : 0,
53 |                             FormMorris : DrawBAR,   title : "",  TYPE :  $BAR   , FORMAT :"P"
54 |                             use   View  ($MS4VIEWDBTMP)                   
55 |                 >  /* end div */
56 |               >  /* end col lg:6 */
57 |       >;  
58 |       <Rwd_Col  : sm:12,md:12,lg:12 : 
59 |         <    Rwd_Row + $bg_primary :  
60 |       
61 |         <div $widget    :
62 |       
63 | ** ***************** DRAW GRID   ************************************************************************    
64 |              DBconnect{Ms4DB}(LocalServerDB),  Ms4_query{ms4db}  option : into  $MS4DBTMP 
65 |         (" SELECT  *   from  [ms4TotalPopulByProvince]  order by TOTALthousandPopulationByProvince desc limit 10 " ) , ** TOP 8
66 |         DBconnect{Ms4DB}($MS4DBTMP),  
67 |         FormPlus : Drawgrid,  title : ""  use   View  ($MS4VIEWDBTMP) 
68 |         >
69 |       > 
70 |       >;
71 |  End_Block_Rwd ;          
72 |