[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
From Flames To Fork, Comes Freedom • View topic - Sexy Chart Maker!

Sexy Chart Maker!

The migration of Adempiere modules to iDempiere

Sexy Chart Maker!

Postby red1 » Fri May 06, 2016 7:01 am

Would you like your Sales YTD Chart looking like the first one? And then with a simple input and click becomes the next one? Dream no more. It is happening with the Sexy Chart Maker!

StackedBarDifferent.png
StackedBarDifferent.png (42.49 KiB) Viewed 11807 times
The first was created by login as SystemAdmin and at the Chart Maker Process:

ChartMakeByProduct.png
ChartMakeByProduct.png (37.6 KiB) Viewed 11807 times
After click OK, relogin as your Client and call up your Sales Rep Dashboard and look at the Sales YTD Chart inside. Your sales data over the months are broken down according to Product. To switch to a break-down by Customers, go back to the SystemAdmin > Chart Maker:

ChartMakeByBP.png
ChartMakeByBP.png (35.35 KiB) Viewed 11807 times
If you call up the Chart window and look for Sales YTD you will see it been rewritten as:

GeneratedChartDS.png
GeneratedChartDS.png (121.24 KiB) Viewed 11807 times
If you specify a new ChartName, it will generate for you a new one (not tested yet so if anyone hits any bugs do tell me and it should be easily fixed).

In theory this Chart Maker can generate from any table source, to any field amount, to time based (or even different category but its not tested) of different time type (Day, Week, Month, Year), and any breakdown column. Just specify the in between tables for it to join and that final column breaker as shown in the two examples above. It can theoretically go to any length of joins. Thus you can have LineNetAmt>C_Order.C_BPartner_Location.C_Location.C_Region_ID (this is untested imaginary example to give you the idea behind my creation so check if your tables joining is logical with the breaker column as existing and it must work.

The chart datasource generating also will check the table data set (C_OrderLine) as having such break data before it creates that datasource line. Thus if you have fresh new data for the break, you should just give this ChartMaker a reprocess again. Just remember to do a Chart Maker process entirely in the SystemAdmin or else it will not delete its old datasource records.

This Chart model is a graphical statistical presentation layer and has no impact to actual live data. By the way this ChartMaker process is also created using the Aladdin Magic Plugin to speed up my development of this.

The Chart Maker source is committed to http://bitbucket.org/red1/org.red1.chartmaker. Binary plugin is at http://sourceforge.net/projects/red1/files/ChartMaker/. You do not need the 2Pack. It is already included in the plugin. Just install using Felix Console and login SystemAdmin you will see the Chart Maker process.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Sexy Chart Maker!

Postby red1 » Sat May 07, 2016 8:39 am

I found a trick where you can do Chart Maker and Dashboard view side by side without switching to SystemAdmin and back! First in SystemAdmin delete the Sales YTD's DataSource tab details as you be generating them entirely from your ClientAdmin.
You can also make the DataAccessLevel of Chart and ChartDataSource tables to 'ALL'.

TableAccessLevel.png
TableAccessLevel.png (43.83 KiB) Viewed 11704 times
Then you can operate freely in your GardenWorld or ClientAdmin calling up the Chart Maker and Sales Rep Dashboard side by side.

SideBySide.png
SideBySide.png (45.42 KiB) Viewed 11704 times
After clicking OK, you can see the Dashboard, then go change some break column and refresh the Dashboard magically.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Sexy Chart Maker!

Postby red1 » Sat May 07, 2016 3:16 pm

Attachments
WhereClauseControl.png
WhereClauseControl.png (45.3 KiB) Viewed 11695 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Sexy Chart Maker!

Postby red1 » Tue May 10, 2016 12:29 pm

Made a Youtube movie to show how to setup from scratch and make it work on same Client page.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Sexy Chart Maker!

Postby red1 » Fri May 13, 2016 11:24 am

In the movie, when i clicked on the bar, it does not open up with selected data because i have set the base table as C_OrderLine and its window is Sales Order which is based on C_Order table. So in order for it to work, it is very easily solved. Just create a new Window 'Order Line' with a tab for C_OrderLine. Then in the Table and Column for C_OrderLine, set its window to point to this new one.

OrderLineWindowSet.png
OrderLineWindowSet.png (57 KiB) Viewed 11571 times
Login back to Client, it works as below:

MouseoverBarInfo.png
MouseoverBarInfo.png (21.69 KiB) Viewed 11571 times
Mouse over any bar will give info about what is represented. In this case its a product total value of 40.5. Then clicking on it...

OrderLineWindow.png
OrderLineWindow.png (48.16 KiB) Viewed 11571 times
The new Order Line window is open and perfectly giving only the associated records, two Order records with their LineNetAmt column totaling 40.5. You can even right click on the parent order and zoom into the Sales Order window. Now this is truly powerful and fully integrated. Not only that, remember also that this plugin brings no impact to the core iDempiere. No core code nor the ChartDataSource model needs to change.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Sexy Chart Maker!

Postby red1 » Mon May 30, 2016 5:30 pm

Attachments
OpportunityChartMaker.png
OpportunityChartMaker.png (41.82 KiB) Viewed 11452 times
Opportunity3DStacked.png
Opportunity3DStacked.png (25.21 KiB) Viewed 11452 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Sexy Chart Maker!

Postby red1 » Tue May 31, 2016 8:49 pm

It seems the whole bloody thing does work! Here is the first sample (with new Opportunity data)

TotalOpportunity.png
TotalOpportunity.png (27.47 KiB) Viewed 11410 times
And after applying the weighted formula:

WeightedOpportunity.png
WeightedOpportunity.png (27.53 KiB) Viewed 11410 times
You can click on any bar to zoom into the record and see the Weighted values as exact. And all such formulas are saved in the PInstance:

SavedParameters.png
SavedParameters.png (62.45 KiB) Viewed 11410 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Sexy Chart Maker!

Postby red1 » Wed Jun 01, 2016 4:27 am

Fixed some small bugs when testing as 2 dimensional Category chart, for Opportunities according to Campaign with breakdown by Sales Stages:

CampaignAndStage.png
CampaignAndStage.png (24.38 KiB) Viewed 11403 times
C'est parfait! The secret is due to putting a correct table field in the Chart Maker:

CampaignStageSetting.png
CampaignStageSetting.png (64.53 KiB) Viewed 11403 times
Note the extra table C_Campaign and the b.Name which refers to that and so every Campaign ID is filtered by its JOIN name field. The Time field is kept blank. This proves the use of non time series as a CategoryColumn. Now you can play with any type of dimension. Source and plugin links updated respectively.
With the power of the Saved Parameters, you can set all these charts one time and choose them at will. Here is the Sales Rep Dashboard for the two charts side by side to see its appeal.

BothCharts.png
BothCharts.png (89.46 KiB) Viewed 11403 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Sexy Chart Maker!

Postby red1 » Sat Jun 04, 2016 6:47 am

Made a movie to better demonstrate the latest above.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia


Return to iDempiere

Who is online

Users browsing this forum: No registered users and 1 guest

cron