Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
e9882cbf
Commit
e9882cbf
authored
Sep 20, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Load advanced sparkline settings.
parent
516d986c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
28 deletions
+44
-28
apps/spreadsheeteditor/main/app/view/ChartSettings.js
apps/spreadsheeteditor/main/app/view/ChartSettings.js
+2
-0
apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js
apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js
+42
-28
No files found.
apps/spreadsheeteditor/main/app/view/ChartSettings.js
View file @
e9882cbf
...
...
@@ -526,6 +526,8 @@ define([
this
.
chMarkersPoint
.
setValue
((
point
!==
null
&&
point
!==
undefined
)
?
point
:
'
indeterminate
'
,
true
);
this
.
_state
.
MarkersPoint
=
point
;
}
this
.
chMarkersPoint
.
setDisabled
(
this
.
_locked
||
this
.
_state
.
SparkType
!==
Asc
.
c_oAscSparklineType
.
Line
);
if
(
color
)
{
this
.
MarkersColor
=
(
color
.
asc_getType
()
==
Asc
.
c_oAscColor
.
COLOR_TYPE_SCHEME
)
?
{
color
:
Common
.
Utils
.
ThemeColor
.
getHexColor
(
color
.
asc_getR
(),
color
.
asc_getG
(),
color
.
asc_getB
()),
effectValue
:
color
.
asc_getValue
()
}
:
...
...
apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js
View file @
e9882cbf
...
...
@@ -82,7 +82,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this
.
_state
=
{
ChartStyle
:
1
,
ChartType
:
Asc
.
c_oAscChartTypeSettings
.
barNormal
ChartType
:
Asc
.
c_oAscChartTypeSettings
.
barNormal
,
SparkType
:
-
1
};
this
.
_noApply
=
true
;
...
...
@@ -827,7 +828,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
{
id
:
'
menu-chart-group-sparkwin
'
,
caption
:
me
.
textWinLossSpark
}
]),
store
:
new
Common
.
UI
.
DataViewStore
([
{
group
:
'
menu-chart-group-sparkcolumn
'
,
type
:
Asc
.
c_oAscSparklineType
.
Column
,
allowSelected
:
true
,
iconCls
:
'
spark-column
'
,
selected
:
true
},
{
group
:
'
menu-chart-group-sparkcolumn
'
,
type
:
Asc
.
c_oAscSparklineType
.
Column
,
allowSelected
:
true
,
iconCls
:
'
spark-column
'
},
{
group
:
'
menu-chart-group-sparkline
'
,
type
:
Asc
.
c_oAscSparklineType
.
Line
,
allowSelected
:
true
,
iconCls
:
'
spark-line
'
},
{
group
:
'
menu-chart-group-sparkwin
'
,
type
:
Asc
.
c_oAscSparklineType
.
Stacked
,
allowSelected
:
true
,
iconCls
:
'
spark-win
'
}
]),
...
...
@@ -905,17 +906,17 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
el
:
$
(
'
#spark-dlg-btn-data
'
)
});
// this.btnSelectLocationData.on('click', _.bind(this.onSelectData, this));
this
.
_arrEmptyCells
=
[
{
value
:
Asc
.
c_oAscEDispBlanksAs
.
Gap
,
displayValue
:
this
.
textGaps
},
{
value
:
Asc
.
c_oAscEDispBlanksAs
.
Zero
,
displayValue
:
this
.
textZero
},
{
value
:
Asc
.
c_oAscEDispBlanksAs
.
Span
,
displayValue
:
this
.
textEmptyLine
}
];
this
.
cmbEmptyCells
=
new
Common
.
UI
.
ComboBox
({
el
:
$
(
'
#spark-dlg-combo-empty
'
),
menuStyle
:
'
min-width: 188px;
'
,
editable
:
false
,
cls
:
'
input-group-nr
'
,
data
:
[
{
value
:
0
,
displayValue
:
this
.
textGaps
},
{
value
:
1
,
displayValue
:
this
.
textZero
},
{
value
:
2
,
displayValue
:
this
.
textEmptyLine
}
]
cls
:
'
input-group-nr
'
});
this
.
chShowEmpty
=
new
Common
.
UI
.
CheckBox
({
...
...
@@ -941,17 +942,14 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle
:
'
min-width: 100px;
'
,
editable
:
false
,
data
:
[
{
displayValue
:
this
.
textAutoEach
,
value
:
Asc
.
c_oAsc
ValAxisRule
.
auto
},
{
displayValue
:
this
.
textSameAll
,
value
:
Asc
.
c_oAsc
ValAxisRule
.
auto
},
{
displayValue
:
this
.
textFixed
,
value
:
Asc
.
c_oAsc
ValAxisRule
.
fixed
}
{
displayValue
:
this
.
textAutoEach
,
value
:
Asc
.
c_oAsc
SparklineAxisMinMax
.
Individual
},
{
displayValue
:
this
.
textSameAll
,
value
:
Asc
.
c_oAsc
SparklineAxisMinMax
.
Group
},
{
displayValue
:
this
.
textFixed
,
value
:
Asc
.
c_oAsc
SparklineAxisMinMax
.
Custom
}
]
}).
on
(
'
selected
'
,
_
.
bind
(
function
(
combo
,
record
)
{
// if (this.currentAxisProps) {
// this.currentAxisProps.putMinValRule(record.value);
// if (record.value==Asc.c_oAscValAxisRule.auto) {
// this.spnSparkMinValue.setValue(this._originalAxisVValues.minAuto, true);
// }
// }
this
.
spnSparkMinValue
.
setDisabled
(
record
.
value
!==
Asc
.
c_oAscSparklineAxisMinMax
.
Custom
);
// if (record.value==Asc.c_oAscSparklineAxisMinMax.Custom)
// this.spnSparkMinValue.setValue(this._originalAxisVValues.minAuto, true);
},
this
));
this
.
spnSparkMinValue
=
new
Common
.
UI
.
MetricSpinner
({
...
...
@@ -978,17 +976,14 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle
:
'
min-width: 100px;
'
,
editable
:
false
,
data
:
[
{
displayValue
:
this
.
textAutoEach
,
value
:
Asc
.
c_oAsc
ValAxisRule
.
auto
},
{
displayValue
:
this
.
textSameAll
,
value
:
Asc
.
c_oAsc
ValAxisRule
.
auto
},
{
displayValue
:
this
.
textFixed
,
value
:
Asc
.
c_oAsc
ValAxisRule
.
fixed
}
{
displayValue
:
this
.
textAutoEach
,
value
:
Asc
.
c_oAsc
SparklineAxisMinMax
.
Individual
},
{
displayValue
:
this
.
textSameAll
,
value
:
Asc
.
c_oAsc
SparklineAxisMinMax
.
Group
},
{
displayValue
:
this
.
textFixed
,
value
:
Asc
.
c_oAsc
SparklineAxisMinMax
.
Custom
}
]
}).
on
(
'
selected
'
,
_
.
bind
(
function
(
combo
,
record
)
{
// if (this.currentAxisProps) {
// this.currentAxisProps.putMaxValRule(record.value);
// if (record.value==Asc.c_oAscValAxisRule.auto) {
// this.spnMaxValue.setValue(this._originalAxisVValues.maxAuto, true);
// }
// }
this
.
spnSparkMaxValue
.
setDisabled
(
record
.
value
!==
Asc
.
c_oAscSparklineAxisMinMax
.
Custom
);
// if (record.value==Asc.c_oAscSparklineAxisMinMax.Custom) {
// this.spnSparkMaxValue.setValue(this._originalAxisVValues.maxAuto, true);
},
this
));
this
.
spnSparkMaxValue
=
new
Common
.
UI
.
MetricSpinner
({
...
...
@@ -1388,7 +1383,26 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this
.
updateAxisProps
(
this
.
_state
.
ChartType
);
this
.
currentChartType
=
this
.
_state
.
ChartType
;
}
else
{
// sparkline
this
.
_state
.
SparkType
=
props
.
asc_getType
();
var
record
=
this
.
mnuSparkTypePicker
.
store
.
findWhere
({
type
:
this
.
_state
.
SparkType
});
this
.
mnuSparkTypePicker
.
selectRecord
(
record
,
true
);
if
(
record
)
this
.
btnSparkType
.
setIconCls
(
'
item-chartlist
'
+
record
.
get
(
'
iconCls
'
));
// this.updateSparkStyles(this.api.asc_getChartPreviews(this._state.SparkType));
if
(
this
.
_state
.
SparkType
!==
Asc
.
c_oAscSparklineType
.
Line
)
this
.
_arrEmptyCells
.
pop
();
this
.
cmbEmptyCells
.
setData
(
this
.
_arrEmptyCells
);
this
.
cmbEmptyCells
.
setValue
(
props
.
asc_getDisplayEmpty
());
this
.
chShowEmpty
.
setValue
(
props
.
asc_getDisplayHidden
(),
true
);
this
.
chShowAxis
.
setValue
(
props
.
asc_getDisplayXAxis
(),
true
);
this
.
chReverse
.
setValue
(
props
.
asc_getRightToLeft
(),
true
);
this
.
cmbSparkMinType
.
setValue
(
props
.
asc_getMinAxisType
(),
true
);
this
.
cmbSparkMaxType
.
setValue
(
props
.
asc_getMaxAxisType
(),
true
);
this
.
spnSparkMinValue
.
setDisabled
(
props
.
asc_getMinAxisType
()
!==
Asc
.
c_oAscSparklineAxisMinMax
.
Custom
);
this
.
spnSparkMaxValue
.
setDisabled
(
props
.
asc_getMaxAxisType
()
!==
Asc
.
c_oAscSparklineAxisMinMax
.
Custom
);
}
}
},
...
...
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