Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
d90bb719
Commit
d90bb719
authored
Nov 10, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
charts preset
parent
5112ee80
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
775 additions
and
42 deletions
+775
-42
common/Charts/charts.js
common/Charts/charts.js
+17
-24
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+706
-17
common/Shapes/EditorSettings.js
common/Shapes/EditorSettings.js
+52
-1
No files found.
common/Charts/charts.js
View file @
d90bb719
...
@@ -315,18 +315,18 @@ ChartPreviewManager.prototype.getChartByType = function(type)
...
@@ -315,18 +315,18 @@ ChartPreviewManager.prototype.getChartByType = function(type)
chart_space
.
spPr
.
xfrm
.
setOffY
(
0
);
chart_space
.
spPr
.
xfrm
.
setOffY
(
0
);
chart_space
.
spPr
.
xfrm
.
setExtX
(
50
);
chart_space
.
spPr
.
xfrm
.
setExtX
(
50
);
chart_space
.
spPr
.
xfrm
.
setExtY
(
50
);
chart_space
.
spPr
.
xfrm
.
setExtY
(
50
);
settings
.
putTitle
(
Asc
.
c_oAscChartTitleShowSettings
.
no
ne
);
settings
.
putTitle
(
Asc
.
c_oAscChartTitleShowSettings
.
no
Overlay
);
settings
.
putHorAxisLabel
(
Asc
.
c_oAscChartTitleShowSettings
.
none
);
//
settings.putHorAxisLabel(Asc.c_oAscChartTitleShowSettings.none);
settings
.
putVertAxisLabel
(
Asc
.
c_oAscChartTitleShowSettings
.
none
);
//
settings.putVertAxisLabel(Asc.c_oAscChartTitleShowSettings.none);
settings
.
putLegendPos
(
Asc
.
c_oAscChartLegendShowSettings
.
none
);
//
settings.putLegendPos(Asc.c_oAscChartLegendShowSettings.none);
settings
.
putHorGridLines
(
Asc
.
c_oAscGridLinesSettings
.
none
);
//
settings.putHorGridLines(Asc.c_oAscGridLinesSettings.none);
settings
.
putVertGridLines
(
Asc
.
c_oAscGridLinesSettings
.
none
);
//
settings.putVertGridLines(Asc.c_oAscGridLinesSettings.none);
var
val_ax_props
=
new
AscCommon
.
asc_ValAxisSettings
();
var
val_ax_props
=
new
AscCommon
.
asc_ValAxisSettings
();
val_ax_props
.
putMinValRule
(
Asc
.
c_oAscValAxisRule
.
auto
);
val_ax_props
.
putMinValRule
(
Asc
.
c_oAscValAxisRule
.
auto
);
val_ax_props
.
putMaxValRule
(
Asc
.
c_oAscValAxisRule
.
auto
);
val_ax_props
.
putMaxValRule
(
Asc
.
c_oAscValAxisRule
.
auto
);
val_ax_props
.
putTickLabelsPos
(
c_oAscTickLabelsPos
.
TICK_LABEL_POSITION_N
ONE
);
val_ax_props
.
putTickLabelsPos
(
c_oAscTickLabelsPos
.
TICK_LABEL_POSITION_N
EXT_TO
);
val_ax_props
.
putInvertValOrder
(
false
);
val_ax_props
.
putInvertValOrder
(
false
);
val_ax_props
.
putDispUnitsRule
(
Asc
.
c_oAscValAxUnits
.
none
);
val_ax_props
.
putDispUnitsRule
(
Asc
.
c_oAscValAxUnits
.
none
);
val_ax_props
.
putMajorTickMark
(
c_oAscTickMark
.
TICK_MARK_NONE
);
val_ax_props
.
putMajorTickMark
(
c_oAscTickMark
.
TICK_MARK_NONE
);
...
@@ -337,7 +337,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
...
@@ -337,7 +337,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
var
cat_ax_props
=
new
AscCommon
.
asc_CatAxisSettings
();
var
cat_ax_props
=
new
AscCommon
.
asc_CatAxisSettings
();
cat_ax_props
.
putIntervalBetweenLabelsRule
(
Asc
.
c_oAscBetweenLabelsRule
.
auto
);
cat_ax_props
.
putIntervalBetweenLabelsRule
(
Asc
.
c_oAscBetweenLabelsRule
.
auto
);
cat_ax_props
.
putLabelsPosition
(
Asc
.
c_oAscLabelsPosition
.
betweenDivisions
);
cat_ax_props
.
putLabelsPosition
(
Asc
.
c_oAscLabelsPosition
.
betweenDivisions
);
cat_ax_props
.
putTickLabelsPos
(
c_oAscTickLabelsPos
.
TICK_LABEL_POSITION_N
ONE
);
cat_ax_props
.
putTickLabelsPos
(
c_oAscTickLabelsPos
.
TICK_LABEL_POSITION_N
EXT_TO
);
cat_ax_props
.
putLabelsAxisDistance
(
100
);
cat_ax_props
.
putLabelsAxisDistance
(
100
);
cat_ax_props
.
putMajorTickMark
(
c_oAscTickMark
.
TICK_MARK_NONE
);
cat_ax_props
.
putMajorTickMark
(
c_oAscTickMark
.
TICK_MARK_NONE
);
cat_ax_props
.
putMinorTickMark
(
c_oAscTickMark
.
TICK_MARK_NONE
);
cat_ax_props
.
putMinorTickMark
(
c_oAscTickMark
.
TICK_MARK_NONE
);
...
@@ -377,6 +377,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
...
@@ -377,6 +377,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
cat_ax_props
.
putLabelsPosition
(
AscFormat
.
CROSS_BETWEEN_BETWEEN
);
cat_ax_props
.
putLabelsPosition
(
AscFormat
.
CROSS_BETWEEN_BETWEEN
);
vert_axis_settings
=
val_ax_props
;
vert_axis_settings
=
val_ax_props
;
hor_axis_settings
=
cat_ax_props
;
hor_axis_settings
=
cat_ax_props
;
break
;
break
;
}
}
...
@@ -423,6 +424,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
...
@@ -423,6 +424,7 @@ ChartPreviewManager.prototype.getChartByType = function(type)
new_line
.
setFill
(
new
AscFormat
.
CUniFill
());
new_line
.
setFill
(
new
AscFormat
.
CUniFill
());
new_line
.
Fill
.
setFill
(
new
AscFormat
.
CNoFill
());
new_line
.
Fill
.
setFill
(
new
AscFormat
.
CNoFill
());
chart_space
.
spPr
.
setLn
(
new_line
);
chart_space
.
spPr
.
setLn
(
new_line
);
chart_space
.
recalcInfo
.
recalculateReferences
=
false
;
chart_space
.
recalcInfo
.
recalculateReferences
=
false
;
chart_space
.
recalculate
();
chart_space
.
recalculate
();
...
@@ -439,20 +441,8 @@ ChartPreviewManager.prototype.createChartPreview = function(type, styleIndex) {
...
@@ -439,20 +441,8 @@ ChartPreviewManager.prototype.createChartPreview = function(type, styleIndex) {
if
(
!
this
.
chartsByTypes
[
type
])
if
(
!
this
.
chartsByTypes
[
type
])
this
.
chartsByTypes
[
type
]
=
this
.
getChartByType
(
type
);
this
.
chartsByTypes
[
type
]
=
this
.
getChartByType
(
type
);
var
chart_space
=
this
.
chartsByTypes
[
type
];
var
chart_space
=
this
.
chartsByTypes
[
type
];
if
(
chart_space
.
style
!==
styleIndex
)
AscFormat
.
ApplyPresetToChartSpace
(
chart_space
,
AscCommon
.
g_oChartPresets
[
type
][
styleIndex
]);
{
chart_space
.
recalculate
();
chart_space
.
style
=
styleIndex
;
chart_space
.
recalculateMarkers
();
chart_space
.
recalculateSeriesColors
();
chart_space
.
recalculatePlotAreaChartBrush
();
chart_space
.
recalculatePlotAreaChartPen
();
chart_space
.
recalculateWalls
();
chart_space
.
recalculateChartBrush
();
chart_space
.
recalculateChartPen
();
chart_space
.
recalculateUpDownBars
();
}
chart_space
.
recalculatePenBrush
();
if
(
null
===
this
.
_canvas_charts
)
{
if
(
null
===
this
.
_canvas_charts
)
{
this
.
_canvas_charts
=
document
.
createElement
(
'
canvas
'
);
this
.
_canvas_charts
=
document
.
createElement
(
'
canvas
'
);
...
@@ -482,8 +472,11 @@ ChartPreviewManager.prototype.getChartPreviews = function(chartType) {
...
@@ -482,8 +472,11 @@ ChartPreviewManager.prototype.getChartPreviews = function(chartType) {
if
(
!
this
.
previewGroups
.
hasOwnProperty
(
chartType
))
{
if
(
!
this
.
previewGroups
.
hasOwnProperty
(
chartType
))
{
this
.
previewGroups
[
chartType
]
=
[];
this
.
previewGroups
[
chartType
]
=
[];
var
arr
=
this
.
previewGroups
[
chartType
];
var
arr
=
this
.
previewGroups
[
chartType
];
for
(
var
i
=
1
;
i
<
49
;
++
i
)
if
(
AscCommon
.
g_oChartPresets
[
chartType
]){
arr
.
push
(
this
.
createChartPreview
(
chartType
,
i
));
var
nStylesCount
=
AscCommon
.
g_oChartPresets
[
chartType
].
length
;
for
(
var
i
=
0
;
i
<
nStylesCount
;
++
i
)
arr
.
push
(
this
.
createChartPreview
(
chartType
,
i
));
}
}
}
var
group
=
this
.
previewGroups
[
chartType
];
var
group
=
this
.
previewGroups
[
chartType
];
var
objectGroup
=
[];
var
objectGroup
=
[];
...
...
common/Drawings/CommonController.js
View file @
d90bb719
This diff is collapsed.
Click to expand it.
common/Shapes/EditorSettings.js
View file @
d90bb719
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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