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
dd04e988
Commit
dd04e988
authored
May 01, 2016
by
SergeyLuzyanin
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Возможность выставлять заголовки диаграмм
parent
e7a60e92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
3 deletions
+89
-3
common/Drawings/Format/ChartFormat.js
common/Drawings/Format/ChartFormat.js
+2
-2
word/apiBuilder.js
word/apiBuilder.js
+87
-1
No files found.
common/Drawings/Format/ChartFormat.js
View file @
dd04e988
...
@@ -2050,7 +2050,7 @@ CPlotArea.prototype =
...
@@ -2050,7 +2050,7 @@ CPlotArea.prototype =
return
axis_by_types
.
valAx
[
i
];
return
axis_by_types
.
valAx
[
i
];
}
}
for
(
var
i
=
0
;
i
<
axis_by_types
.
val
Ax
.
length
;
++
i
)
for
(
var
i
=
0
;
i
<
axis_by_types
.
cat
Ax
.
length
;
++
i
)
{
{
if
(
axis_by_types
.
catAx
[
i
].
axPos
===
AX_POS_B
||
axis_by_types
.
catAx
[
i
].
axPos
===
AX_POS_T
)
if
(
axis_by_types
.
catAx
[
i
].
axPos
===
AX_POS_B
||
axis_by_types
.
catAx
[
i
].
axPos
===
AX_POS_T
)
return
axis_by_types
.
catAx
[
i
];
return
axis_by_types
.
catAx
[
i
];
...
@@ -2070,7 +2070,7 @@ CPlotArea.prototype =
...
@@ -2070,7 +2070,7 @@ CPlotArea.prototype =
return
axis_by_types
.
valAx
[
i
];
return
axis_by_types
.
valAx
[
i
];
}
}
for
(
var
i
=
0
;
i
<
axis_by_types
.
val
Ax
.
length
;
++
i
)
for
(
var
i
=
0
;
i
<
axis_by_types
.
cat
Ax
.
length
;
++
i
)
{
{
if
(
axis_by_types
.
catAx
[
i
].
axPos
===
AX_POS_L
||
axis_by_types
.
catAx
[
i
].
axPos
===
AX_POS_R
)
if
(
axis_by_types
.
catAx
[
i
].
axPos
===
AX_POS_L
||
axis_by_types
.
catAx
[
i
].
axPos
===
AX_POS_R
)
return
axis_by_types
.
catAx
[
i
];
return
axis_by_types
.
catAx
[
i
];
...
...
word/apiBuilder.js
View file @
dd04e988
...
@@ -881,7 +881,7 @@
...
@@ -881,7 +881,7 @@
/**
/**
* Create a blip fill
* Create a blip fill
* @memberof Api
* @memberof Api
* @param {
S
tring} sImageUrl
* @param {
s
tring} sImageUrl
* @param {BlipFillType} sBlipFillType
* @param {BlipFillType} sBlipFillType
* @returns {ApiFill}
* @returns {ApiFill}
* */
* */
...
@@ -3648,6 +3648,88 @@
...
@@ -3648,6 +3648,88 @@
return
"
chart
"
;
return
"
chart
"
;
};
};
/**
* Specifies a chart title
* @param {string} sTitle
* */
ApiChart
.
prototype
.
SetTitle
=
function
(
sTitle
)
{
if
(
this
.
Chart
)
{
if
(
typeof
sTitle
===
"
string
"
&&
sTitle
.
length
>
0
)
{
this
.
Chart
.
chart
.
setTitle
(
AscFormat
.
CTitle
());
this
.
Chart
.
chart
.
title
.
setTx
(
AscFormat
.
CTx
());
this
.
Chart
.
chart
.
title
.
tx
.
setRich
(
CreateTextBodyFromString
(
sTitle
,
this
.
Chart
.
getDrawingDocument
(),
this
.
Chart
.
chart
.
title
.
tx
))
}
else
{
this
.
Chart
.
chart
.
setTitle
(
null
);
}
}
};
/**
* Specifies a horizontal axis title
* @param {string} sTitle
* */
ApiChart
.
prototype
.
SetHorAxisTitle
=
function
(
sTitle
)
{
if
(
this
.
Chart
)
{
var
horAxis
=
this
.
Chart
.
chart
.
plotArea
.
getHorizontalAxis
();
if
(
horAxis
)
{
if
(
typeof
sTitle
===
"
string
"
&&
sTitle
.
length
>
0
)
{
horAxis
.
setTitle
(
new
AscFormat
.
CTitle
());
horAxis
.
title
.
setTx
(
new
AscFormat
.
CChartText
());
horAxis
.
title
.
tx
.
setRich
(
AscFormat
.
CreateTextBodyFromString
(
sTitle
,
this
.
Chart
.
getDrawingDocument
(),
horAxis
.
title
.
tx
));
horAxis
.
title
.
setOverlay
(
false
);
}
else
{
horAxis
.
setTitle
(
null
);
}
}
}
};
/**
* Specifies a vertical axis title
* @param {string} sTitle
* */
ApiChart
.
prototype
.
SetVerAxisTitle
=
function
(
sTitle
)
{
if
(
this
.
Chart
)
{
var
verAxis
=
this
.
Chart
.
chart
.
plotArea
.
getVerticalAxis
();
if
(
verAxis
)
{
if
(
typeof
sTitle
===
"
string
"
&&
sTitle
.
length
>
0
)
{
verAxis
.
setTitle
(
new
AscFormat
.
CTitle
());
verAxis
.
title
.
setTx
(
new
AscFormat
.
CChartText
());
verAxis
.
title
.
tx
.
setRich
(
AscFormat
.
CreateTextBodyFromString
(
sTitle
,
this
.
Chart
.
getDrawingDocument
(),
verAxis
.
title
.
tx
));
var
_body_pr
=
new
AscFormat
.
CBodyPr
();
_body_pr
.
reset
();
if
(
!
verAxis
.
title
.
txPr
)
{
verAxis
.
title
.
setTxPr
(
AscFormat
.
CreateTextBodyFromString
(
""
,
this
.
Chart
.
getDrawingDocument
(),
verAxis
.
title
));
}
var
_text_body
=
verAxis
.
title
.
txPr
;
_text_body
.
setBodyPr
(
_body_pr
);
verAxis
.
title
.
setOverlay
(
false
);
}
else
{
verAxis
.
setTitle
(
null
);
}
}
}
};
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
//
//
// ApiFill
// ApiFill
...
@@ -3982,6 +4064,9 @@
...
@@ -3982,6 +4064,9 @@
ApiShape
.
prototype
[
"
SetVerticalTextAlign
"
]
=
ApiShape
.
prototype
.
SetVerticalTextAlign
;
ApiShape
.
prototype
[
"
SetVerticalTextAlign
"
]
=
ApiShape
.
prototype
.
SetVerticalTextAlign
;
ApiChart
.
prototype
[
"
GetClassType
"
]
=
ApiChart
.
prototype
.
GetClassType
;
ApiChart
.
prototype
[
"
GetClassType
"
]
=
ApiChart
.
prototype
.
GetClassType
;
ApiChart
.
prototype
[
"
SetTitle
"
]
=
ApiChart
.
prototype
.
SetTitle
;
ApiChart
.
prototype
[
"
SetHorAxisTitle
"
]
=
ApiChart
.
prototype
.
SetHorAxisTitle
;
ApiChart
.
prototype
[
"
SetVerAxisTitle
"
]
=
ApiChart
.
prototype
.
SetVerAxisTitle
;
ApiFill
.
prototype
[
"
GetClassType
"
]
=
ApiFill
.
prototype
.
GetClassType
;
ApiFill
.
prototype
[
"
GetClassType
"
]
=
ApiFill
.
prototype
.
GetClassType
;
...
@@ -4773,6 +4858,7 @@ function TEST_BUILDER()
...
@@ -4773,6 +4858,7 @@ function TEST_BUILDER()
oDrawing
.
SetHorPosition
(
"
column
"
,
2347595
);
oDrawing
.
SetHorPosition
(
"
column
"
,
2347595
);
oDrawing
.
SetVerPosition
(
"
paragraph
"
,
346075
);
oDrawing
.
SetVerPosition
(
"
paragraph
"
,
346075
);
oDrawing
.
SetDistances
(
114300
,
0
,
114300
,
0
);
oDrawing
.
SetDistances
(
114300
,
0
,
114300
,
0
);
oDrawing
.
SetVerAxisTitle
(
"
USD In Hundred Thousands
"
);
oParagraph
.
AddDrawing
(
oDrawing
);
oParagraph
.
AddDrawing
(
oDrawing
);
oParagraph
.
AddText
(
"
Financial Overview
"
);
oParagraph
.
AddText
(
"
Financial Overview
"
);
oDocument
.
Push
(
oParagraph
);
oDocument
.
Push
(
oParagraph
);
...
...
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