Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sencha-reporting-portfolio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
sencha-reporting-portfolio
Commits
0747710b
Commit
0747710b
authored
Aug 26, 2014
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Sales Pipeline experiments
parent
3e48553b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
148 additions
and
0 deletions
+148
-0
sales-pipeline.adp
lib/sales-pipeline.adp
+95
-0
sales-pipeline.tcl
lib/sales-pipeline.tcl
+26
-0
sencha-reporting-portfolio-procs.tcl
tcl/sencha-reporting-portfolio-procs.tcl
+27
-0
No files found.
lib/sales-pipeline.adp
0 → 100644
View file @
0747710b
<div id=@diagram_id@></div>
<script type='text/javascript'>
// Ext.Loader.setConfig({enabled: true});
Ext.Loader.setPath('Ext.ux', '/sencha-v411/examples/ux');
Ext.Loader.setPath('PO.model', '/sencha-core/model');
Ext.Loader.setPath('PO.store', '/sencha-core/store');
Ext.Loader.setPath('PO.class', '/sencha-core/class');
Ext.Loader.setPath('PO.view.gantt', '/sencha-core/view/gantt');
Ext.Loader.setPath('PO.controller', '/sencha-core/controller');
Ext.require([
'Ext.data.*',
'Ext.grid.*',
'Ext.tree.*',
'PO.class.CategoryStore',
'PO.store.project.ProjectMainStore'
]);
function launchDiagram(){
var statusStore = Ext.StoreManager.get('projectStatusStore');
var projectMainStore = Ext.StoreManager.get('projectMainStore');
var store1 = Ext.create('Ext.data.JsonStore', {
fields: ['x_axis', 'y_axis', 'color', 'diameter', 'caption'],
data: [
{x_axis: 909000.00, y_axis: 60.00, color: 'blue', diameter: 95.3414914924242200, caption: 'Play House (2014-05-09)'},
{x_axis: 146400.00, y_axis: 80.00, color: 'blue', diameter: 38.2622529394179800, caption: 'Special Machine Half (2014-05-13)'},
{x_axis: 57000.00, y_axis: 50.00, color: 'blue', diameter: 23.8746727726266400, caption: 'SCRUM Generic 1 (2014-05-14)'}
]
});
function createHandler(fieldName) {
return function(sprite, record, attr, index, store) {
return Ext.apply(attr, {
radius: record.get('diameter'),
fill: record.get('color')
});
};
};
var chart = new Ext.chart.Chart({
width: 300,
height: 300,
animate: true,
store: store1,
renderTo: '@diagram_id@',
axes: [{
type: 'Numeric', position: 'left', fields: ['y_axis'], grid: true
}, {
type: 'Numeric', position: 'bottom', fields: ['x_axis']
}],
series: [{
type: 'scatter',
axis: 'left',
xField: 'x_axis',
yField: 'y_axis',
highlight: true,
markerConfig: { type: 'circle' },
renderer: createHandler('xxx'),
label: {
display: 'under',
field: 'caption',
'text-anchor': 'left',
color: '#000'
}
}]
});
};
Ext.onReady(function() {
Ext.QuickTips.init();
var statusStore = Ext.create('PO.store.project.ProjectStatusStore');
var projectMainStore = Ext.create('PO.store.project.ProjectMainStore');
var coordinator = Ext.create('PO.controller.StoreLoadCoordinator', {
stores: [
'projectStatusStore',
'projectMainStore'
],
listeners: {
load: function() {
// Check if the application was launched before
if ("boolean" == typeof this.loadedP) { return; }
// Launch the actual application.
launchDiagram();
// Mark the application as launched
this.loadedP = true;
}
}
});
});
</script>
</div>
lib/sales-pipeline.tcl
0 → 100644
View file @
0747710b
# /packages/sencha-reporting-portfolio/lib/sales-pipeline.tcl
#
# Copyright (C
)
2011
]
project-open
[
#
# All rights reserved. Please check
# http://www.project-open.com/license/ for details.
# ----------------------------------------------------------------------
#
# ---------------------------------------------------------------------
# The following variables are expected in the environment
# defined by the calling /tcl/*.tcl libary:
# program_id
# diagram_width
# diagram_height
# sql Defines the columns x_axis, y_axis, color and diameter
# Create a random ID for the diagram
set
diagram_id
"sales_pipelin_
[
expr
round
(
rand
()
* 100000000.0
)]
"
set
x_axis 0
set
y_axis 0
set
color
"yellow"
set
diameter 5
set
title
""
tcl/sencha-reporting-portfolio-procs.tcl
View file @
0747710b
...
...
@@ -38,6 +38,8 @@ ad_proc -public sencha_scatter_diagram {
return
[
string
trim
$result
]
}
ad_proc -public sencha_milestone_tracker
{
-project_id:required
{
-diagram_width 300
}
...
...
@@ -197,3 +199,28 @@ ad_proc -public sencha_main_project_colors_helper {
}
return
[
array
get hash
]
}
ad_proc -public sencha_sales_pipeline
{
{
-diagram_width 300
}
{
-diagram_height 300
}
{
-diagram_caption
""
}
}
{
Returns a HTML code with a Sencha diagram showing
the current projects in status
"Potential"
, together
with presales_probability and presales_value.
}
{
# Sencha check and permissions
if
{
!
[
im_sencha_extjs_installed_p
]}
{
return
""
}
im_sencha_extjs_load_libraries
set params
[
list
\
[
list
diagram_width
$diagram
_width
]
\
[
list
diagram_height
$diagram
_height
]
\
[
list
diagram_caption
$diagram
_caption
]
]
set result
[
ad_parse_template -params
$params
"/packages/sencha-reporting-portfolio/lib/sales-pipeline"
]
return
[
string
trim
$result
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment