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
139c5874
Commit
139c5874
authored
Jun 08, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SetShowPointDataLabel
parent
46595789
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
0 deletions
+97
-0
cell/apiBuilder.js
cell/apiBuilder.js
+16
-0
common/Drawings/Format/Format.js
common/Drawings/Format/Format.js
+51
-0
slide/apiBuilder.js
slide/apiBuilder.js
+15
-0
word/apiBuilder.js
word/apiBuilder.js
+15
-0
No files found.
cell/apiBuilder.js
View file @
139c5874
...
...
@@ -1115,6 +1115,21 @@
{
AscFormat
.
builder_SetShowDataLabels
(
this
.
Chart
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPercent
);
};
/**
* Spicifies a show options for data labels
* @param {number} nSeriesIndex
* @param {number} nPointIndex
* @param {boolean} bShowSerName
* @param {boolean} bShowCatName
* @param {boolean} bShowVal
* @param {boolean} bShowPercent
* */
ApiChart
.
prototype
.
SetShowPointDataLabel
=
function
(
nSeriesIndex
,
nPointIndex
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPercent
)
{
AscFormat
.
builder_SetShowPointDataLabel
(
this
.
Chart
,
nSeriesIndex
,
nPointIndex
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPercent
);
};
/**
* Spicifies tick labels position vertical axis
* @param {TickLabelPosition} sTickLabelPosition
...
...
@@ -1254,6 +1269,7 @@
ApiChart
.
prototype
[
"
SetLegendPos
"
]
=
ApiChart
.
prototype
.
SetLegendPos
;
ApiChart
.
prototype
[
"
SetLegendFontSize
"
]
=
ApiChart
.
prototype
.
SetLegendFontSize
;
ApiChart
.
prototype
[
"
SetShowDataLabels
"
]
=
ApiChart
.
prototype
.
SetShowDataLabels
;
ApiChart
.
prototype
[
"
SetShowPointDataLabel
"
]
=
ApiChart
.
prototype
.
SetShowPointDataLabel
;
ApiChart
.
prototype
[
"
SetVertAxisTickLabelPosition
"
]
=
ApiChart
.
prototype
.
SetVertAxisTickLabelPosition
;
ApiChart
.
prototype
[
"
SetHorAxisTickLabelPosition
"
]
=
ApiChart
.
prototype
.
SetHorAxisTickLabelPosition
;
...
...
common/Drawings/Format/Format.js
View file @
139c5874
...
...
@@ -10298,6 +10298,56 @@ function CorrectUniColor(asc_color, unicolor, flag)
builder_SetObjectFontSize
(
oChartSpace
.
chart
.
plotArea
.
getVerticalAxis
(),
nFontSize
,
oChartSpace
.
getDrawingDocument
());
}
function
builder_SetShowPointDataLabel
(
oChartSpace
,
nSeriesIndex
,
nPointIndex
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPerecent
){
if
(
oChartSpace
&&
oChartSpace
.
chart
&&
oChartSpace
.
chart
.
plotArea
&&
oChartSpace
.
chart
.
plotArea
.
charts
[
0
]){
var
oChart
=
oChartSpace
.
chart
.
plotArea
.
charts
[
0
];
var
bPieChart
=
oChart
.
getObjectType
()
===
AscDFH
.
historyitem_type_PieChart
||
oChart
.
getObjectType
()
===
AscDFH
.
historyitem_type_DoughnutChart
;
var
ser
=
oChart
.
series
[
nSeriesIndex
];
if
(
ser
){
{
if
(
!
ser
.
dLbls
){
if
(
oChart
.
dLbls
){
ser
.
setDLbls
(
oChart
.
dLbls
.
createDuplicate
());
}
else
{
ser
.
setDLbls
(
new
AscFormat
.
CDLbls
());
ser
.
dLbls
.
setSeparator
(
"
,
"
);
ser
.
dLbls
.
setShowSerName
(
false
);
ser
.
dLbls
.
setShowCatName
(
false
);
ser
.
dLbls
.
setShowVal
(
false
);
ser
.
dLbls
.
setShowLegendKey
(
false
);
if
(
bPieChart
){
ser
.
dLbls
.
setShowPercent
(
false
);
}
ser
.
dLbls
.
setShowBubbleSize
(
false
);
}
}
var
dLbl
=
ser
.
dLbls
.
findDLblByIdx
(
nPointIndex
);
if
(
!
dLbl
)
{
dLbl
=
new
AscFormat
.
CDLbl
();
dLbl
.
setIdx
(
nPointIndex
);
if
(
ser
.
dLbls
.
txPr
)
{
dLbl
.
merge
(
ser
.
dLbls
);
}
ser
.
dLbls
.
addDLbl
(
dLbl
);
}
dLbl
.
setSeparator
(
"
,
"
);
dLbl
.
setShowSerName
(
true
==
bShowSerName
);
dLbl
.
setShowCatName
(
true
==
bShowCatName
);
dLbl
.
setShowVal
(
true
==
bShowVal
);
dLbl
.
setShowLegendKey
(
false
);
if
(
bPieChart
){
dLbl
.
setShowPercent
(
true
===
bShowPerecent
);
}
dLbl
.
setShowBubbleSize
(
false
);
}
}
}
}
function
builder_SetShowDataLabels
(
oChartSpace
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPerecent
){
if
(
oChartSpace
&&
oChartSpace
.
chart
&&
oChartSpace
.
chart
.
plotArea
&&
oChartSpace
.
chart
.
plotArea
.
charts
[
0
]){
var
oChart
=
oChartSpace
.
chart
.
plotArea
.
charts
[
0
];
...
...
@@ -10609,6 +10659,7 @@ function CorrectUniColor(asc_color, unicolor, flag)
window
[
'
AscFormat
'
].
builder_SetVerAxisMinorGridlines
=
builder_SetVerAxisMinorGridlines
;
window
[
'
AscFormat
'
].
builder_SetHorAxisFontSize
=
builder_SetHorAxisFontSize
;
window
[
'
AscFormat
'
].
builder_SetVerAxisFontSize
=
builder_SetVerAxisFontSize
;
window
[
'
AscFormat
'
].
builder_SetShowPointDataLabel
=
builder_SetShowPointDataLabel
;
...
...
slide/apiBuilder.js
View file @
139c5874
...
...
@@ -784,6 +784,20 @@
AscFormat
.
builder_SetShowDataLabels
(
this
.
Chart
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPercent
);
};
/**
* Spicifies a show options for data labels
* @param {number} nSeriesIndex
* @param {number} nPointIndex
* @param {boolean} bShowSerName
* @param {boolean} bShowCatName
* @param {boolean} bShowVal
* @param {boolean} bShowPercent
* */
ApiChart
.
prototype
.
SetShowPointDataLabel
=
function
(
nSeriesIndex
,
nPointIndex
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPercent
)
{
AscFormat
.
builder_SetShowPointDataLabel
(
this
.
Chart
,
nSeriesIndex
,
nPointIndex
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPercent
);
};
/**
* Spicifies tick labels position vertical axis
* @param {TickLabelPosition} sTickLabelPosition
...
...
@@ -942,6 +956,7 @@
ApiChart
.
prototype
[
"
SetLegendPos
"
]
=
ApiChart
.
prototype
.
SetLegendPos
;
ApiChart
.
prototype
[
"
SetLegendFontSize
"
]
=
ApiChart
.
prototype
.
SetLegendFontSize
;
ApiChart
.
prototype
[
"
SetShowDataLabels
"
]
=
ApiChart
.
prototype
.
SetShowDataLabels
;
ApiChart
.
prototype
[
"
SetShowPointDataLabel
"
]
=
ApiChart
.
prototype
.
SetShowPointDataLabel
;
ApiChart
.
prototype
[
"
SetVertAxisTickLabelPosition
"
]
=
ApiChart
.
prototype
.
SetVertAxisTickLabelPosition
;
ApiChart
.
prototype
[
"
SetHorAxisTickLabelPosition
"
]
=
ApiChart
.
prototype
.
SetHorAxisTickLabelPosition
;
...
...
word/apiBuilder.js
View file @
139c5874
...
...
@@ -4245,6 +4245,20 @@
};
/**
* Spicifies a show options for data labels
* @param {number} nSeriesIndex
* @param {number} nPointIndex
* @param {boolean} bShowSerName
* @param {boolean} bShowCatName
* @param {boolean} bShowVal
* @param {boolean} bShowPercent
* */
ApiChart
.
prototype
.
SetShowPointDataLabel
=
function
(
nSeriesIndex
,
nPointIndex
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPercent
)
{
AscFormat
.
builder_SetShowPointDataLabel
(
this
.
Chart
,
nSeriesIndex
,
nPointIndex
,
bShowSerName
,
bShowCatName
,
bShowVal
,
bShowPercent
);
};
/**
* Spicifies tick labels position vertical axis
* @param {TickLabelPosition} sTickLabelPosition
...
...
@@ -4714,6 +4728,7 @@
ApiChart
.
prototype
[
"
SetLegendPos
"
]
=
ApiChart
.
prototype
.
SetLegendPos
;
ApiChart
.
prototype
[
"
SetLegendFontSize
"
]
=
ApiChart
.
prototype
.
SetLegendFontSize
;
ApiChart
.
prototype
[
"
SetShowDataLabels
"
]
=
ApiChart
.
prototype
.
SetShowDataLabels
;
ApiChart
.
prototype
[
"
SetShowPointDataLabel
"
]
=
ApiChart
.
prototype
.
SetShowPointDataLabel
;
ApiChart
.
prototype
[
"
SetVertAxisTickLabelPosition
"
]
=
ApiChart
.
prototype
.
SetVertAxisTickLabelPosition
;
ApiChart
.
prototype
[
"
SetHorAxisTickLabelPosition
"
]
=
ApiChart
.
prototype
.
SetHorAxisTickLabelPosition
;
...
...
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