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
c38bcbc4
Commit
c38bcbc4
authored
Dec 15, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added SetVerAxisOrientation and SetHorAxisOrientation to ApiChart
parent
0d536c96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
0 deletions
+98
-0
cell/apiBuilder.js
cell/apiBuilder.js
+20
-0
common/Drawings/Format/Format.js
common/Drawings/Format/Format.js
+40
-0
slide/apiBuilder.js
slide/apiBuilder.js
+19
-0
word/apiBuilder.js
word/apiBuilder.js
+19
-0
No files found.
cell/apiBuilder.js
View file @
c38bcbc4
...
...
@@ -841,6 +841,23 @@
AscFormat
.
builder_SetChartVertAxisTitle
(
this
.
Chart
,
sTitle
,
nFontSize
);
};
/**
* Specifies a vertical axis orientation
* @param {bool} bIsMinMax
* */
ApiChart
.
prototype
.
SetVerAxisOrientation
=
function
(
bIsMinMax
){
AscFormat
.
builder_SetChartVertAxisOrientation
(
this
.
Chart
,
bIsMinMax
);
};
/**
* Specifies a horizontal axis orientation
* @param {bool} bIsMinMax
* */
ApiChart
.
prototype
.
SetHorAxisOrientation
=
function
(
bIsMinMax
){
AscFormat
.
builder_SetChartHorAxisOrientation
(
this
.
Chart
,
bIsMinMax
);
};
/**
* Specifies a legend position
* @param {"left" | "top" | "right" | "bottom" | "none"} sLegendPos
...
...
@@ -911,9 +928,12 @@
ApiChart
.
prototype
[
"
SetTitle
"
]
=
ApiChart
.
prototype
.
SetTitle
;
ApiChart
.
prototype
[
"
SetHorAxisTitle
"
]
=
ApiChart
.
prototype
.
SetHorAxisTitle
;
ApiChart
.
prototype
[
"
SetVerAxisTitle
"
]
=
ApiChart
.
prototype
.
SetVerAxisTitle
;
ApiChart
.
prototype
[
"
SetVerAxisOrientation
"
]
=
ApiChart
.
prototype
.
SetVerAxisOrientation
;
ApiChart
.
prototype
[
"
SetHorAxisOrientation
"
]
=
ApiChart
.
prototype
.
SetHorAxisOrientation
;
ApiChart
.
prototype
[
"
SetLegendPos
"
]
=
ApiChart
.
prototype
.
SetLegendPos
;
ApiChart
.
prototype
[
"
SetShowDataLabels
"
]
=
ApiChart
.
prototype
.
SetShowDataLabels
;
function
private_SetCoords
(
oDrawing
,
oWorksheet
,
nExtX
,
nExtY
,
nFromCol
,
nColOffset
,
nFromRow
,
nRowOffset
){
oDrawing
.
x
=
0
;
oDrawing
.
y
=
0
;
...
...
common/Drawings/Format/Format.js
View file @
c38bcbc4
...
...
@@ -12439,6 +12439,43 @@ function CorrectUniColor(asc_color, unicolor, flag)
}
}
function
builder_SetChartVertAxisOrientation
(
oChartSpace
,
bIsMinMax
)
{
if
(
oChartSpace
){
var
verAxis
=
oChartSpace
.
chart
.
plotArea
.
getVerticalAxis
();
if
(
verAxis
)
{
if
(
!
verAxis
.
scaling
)
verAxis
.
setScaling
(
new
CScaling
());
var
scaling
=
verAxis
.
scaling
;
if
(
bIsMinMax
){
scaling
.
setOrientation
(
AscFormat
.
ORIENTATION_MIN_MAX
);
}
else
{
scaling
.
setOrientation
(
AscFormat
.
ORIENTATION_MAX_MIN
);
}
}
}
}
function
builder_SetChartHorAxisOrientation
(
oChartSpace
,
bIsMinMax
){
if
(
oChartSpace
){
var
horAxis
=
oChartSpace
.
chart
.
plotArea
.
getHorizontalAxis
();
if
(
horAxis
){
if
(
!
horAxis
.
scaling
)
horAxis
.
setScaling
(
new
CScaling
());
var
scaling
=
horAxis
.
scaling
;
if
(
bIsMinMax
){
scaling
.
setOrientation
(
AscFormat
.
ORIENTATION_MIN_MAX
);
}
else
{
scaling
.
setOrientation
(
AscFormat
.
ORIENTATION_MAX_MIN
);
}
}
}
}
function
builder_SetChartLegendPos
(
oChartSpace
,
sLegendPos
){
if
(
oChartSpace
&&
oChartSpace
.
chart
)
...
...
@@ -12636,6 +12673,9 @@ function CorrectUniColor(asc_color, unicolor, flag)
window
[
'
AscFormat
'
].
builder_SetChartLegendPos
=
builder_SetChartLegendPos
;
window
[
'
AscFormat
'
].
builder_SetShowDataLabels
=
builder_SetShowDataLabels
;
window
[
'
AscFormat
'
].
builder_SetChartVertAxisOrientation
=
builder_SetChartVertAxisOrientation
;
window
[
'
AscFormat
'
].
builder_SetChartHorAxisOrientation
=
builder_SetChartHorAxisOrientation
;
window
[
'
AscFormat
'
].
Ax_Counter
=
Ax_Counter
;
window
[
'
AscFormat
'
].
TYPE_TRACK
=
TYPE_TRACK
;
window
[
'
AscFormat
'
].
TYPE_KIND
=
TYPE_KIND
;
...
...
slide/apiBuilder.js
View file @
c38bcbc4
...
...
@@ -656,6 +656,23 @@
AscFormat
.
builder_SetChartLegendPos
(
this
.
Chart
,
sLegendPos
);
};
/**
* Specifies a vertical axis orientation
* @param {bool} bIsMinMax
* */
ApiChart
.
prototype
.
SetVerAxisOrientation
=
function
(
bIsMinMax
){
AscFormat
.
builder_SetChartVertAxisOrientation
(
this
.
Chart
,
bIsMinMax
);
};
/**
* Specifies a horizontal axis orientation
* @param {bool} bIsMinMax
* */
ApiChart
.
prototype
.
SetHorAxisOrientation
=
function
(
bIsMinMax
){
AscFormat
.
builder_SetChartHorAxisOrientation
(
this
.
Chart
,
bIsMinMax
);
};
/**
* Spicifies a show options for data labels
* @param {boolean} bShowSerName
...
...
@@ -708,6 +725,8 @@
ApiChart
.
prototype
[
"
SetTitle
"
]
=
ApiChart
.
prototype
.
SetTitle
;
ApiChart
.
prototype
[
"
SetHorAxisTitle
"
]
=
ApiChart
.
prototype
.
SetHorAxisTitle
;
ApiChart
.
prototype
[
"
SetVerAxisTitle
"
]
=
ApiChart
.
prototype
.
SetVerAxisTitle
;
ApiChart
.
prototype
[
"
SetVerAxisOrientation
"
]
=
ApiChart
.
prototype
.
SetVerAxisOrientation
;
ApiChart
.
prototype
[
"
SetHorAxisOrientation
"
]
=
ApiChart
.
prototype
.
SetHorAxisOrientation
;
ApiChart
.
prototype
[
"
SetLegendPos
"
]
=
ApiChart
.
prototype
.
SetLegendPos
;
ApiChart
.
prototype
[
"
SetShowDataLabels
"
]
=
ApiChart
.
prototype
.
SetShowDataLabels
;
...
...
word/apiBuilder.js
View file @
c38bcbc4
...
...
@@ -3998,6 +3998,23 @@
}
};
/**
* Specifies a vertical axis orientation
* @param {bool} bIsMinMax
* */
ApiChart
.
prototype
.
SetVerAxisOrientation
=
function
(
bIsMinMax
){
AscFormat
.
builder_SetChartVertAxisOrientation
(
this
.
Chart
,
bIsMinMax
);
};
/**
* Specifies a horizontal axis orientation
* @param {bool} bIsMinMax
* */
ApiChart
.
prototype
.
SetHorAxisOrientation
=
function
(
bIsMinMax
){
AscFormat
.
builder_SetChartHorAxisOrientation
(
this
.
Chart
,
bIsMinMax
);
};
/**
* Specifies a legend position
* @param {"left" | "top" | "right" | "bottom" | "none"} sLegendPos
...
...
@@ -4440,6 +4457,8 @@
ApiChart
.
prototype
[
"
SetTitle
"
]
=
ApiChart
.
prototype
.
SetTitle
;
ApiChart
.
prototype
[
"
SetHorAxisTitle
"
]
=
ApiChart
.
prototype
.
SetHorAxisTitle
;
ApiChart
.
prototype
[
"
SetVerAxisTitle
"
]
=
ApiChart
.
prototype
.
SetVerAxisTitle
;
ApiChart
.
prototype
[
"
SetVerAxisOrientation
"
]
=
ApiChart
.
prototype
.
SetVerAxisOrientation
;
ApiChart
.
prototype
[
"
SetHorAxisOrientation
"
]
=
ApiChart
.
prototype
.
SetHorAxisOrientation
;
ApiChart
.
prototype
[
"
SetLegendPos
"
]
=
ApiChart
.
prototype
.
SetLegendPos
;
ApiChart
.
prototype
[
"
SetShowDataLabels
"
]
=
ApiChart
.
prototype
.
SetShowDataLabels
;
...
...
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