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