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
47171600
Commit
47171600
authored
Apr 08, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sparklines
parent
e6a982b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
7 deletions
+48
-7
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+48
-7
No files found.
common/Charts/DrawingObjects.js
View file @
47171600
...
...
@@ -329,7 +329,7 @@ prot["asc_setFormatCode"] = prot.asc_setFormatCode;
var
nSparklineMultiplier
=
3.5
;
var
nSparklineMultiplier
=
3.
7
5
;
function
CSparklineView
()
{
...
...
@@ -422,6 +422,47 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
chart_space
.
chart
.
plotArea
.
axId
[
i
].
setDelete
(
true
);
}
var
oSerie
=
chart_space
.
chart
.
plotArea
.
charts
[
0
].
series
[
0
];
if
(
!
oSerie
.
spPr
)
{
oSerie
.
setSpPr
(
new
CSpPr
());
}
if
(
oSparklineGroup
.
type
===
Asc
.
ESparklineType
.
Line
)
{
var
oLn
=
new
CLn
();
oLn
.
setW
(
36000
*
nSparklineMultiplier
*
25.4
*
(
oSparklineGroup
.
lineWidth
!=
null
?
oSparklineGroup
.
lineWidth
:
0.75
)
/
72
);
oSerie
.
spPr
.
setLn
(
oLn
);
}
else
{
chart_space
.
chart
.
plotArea
.
charts
[
0
].
setGapWidth
(
30
);
chart_space
.
chart
.
plotArea
.
charts
[
0
].
setOverlap
(
50
);
}
if
(
oSparklineGroup
.
colorSeries
)
{
var
oUnifill
;
if
(
oSparklineGroup
.
colorSeries
instanceof
ThemeColor
)
{
oUnifill
=
CreateUniFillSchemeColorWidthTint
(
map_themeExcel_to_themePresentation
[
oSparklineGroup
.
colorSeries
.
theme
],
oSparklineGroup
.
colorSeries
.
tint
!=
null
?
oSparklineGroup
.
colorSeries
.
tint
:
0
);
}
else
{
oUnifill
=
CreateUnfilFromRGB
(
oSparklineGroup
.
colorSeries
.
getR
(),
oSparklineGroup
.
colorSeries
.
getG
(),
oSparklineGroup
.
colorSeries
.
getB
())
}
var
oSerie
=
chart_space
.
chart
.
plotArea
.
charts
[
0
].
series
[
0
];
if
(
oSparklineGroup
.
type
===
Asc
.
ESparklineType
.
Line
)
{
var
oLn
=
oSerie
.
spPr
.
ln
;
oLn
.
setFill
(
oUnifill
);
oSerie
.
spPr
.
setLn
(
oLn
);
}
else
{
oSerie
.
spPr
.
setFill
(
oUnifill
);
}
}
this
.
chartSpace
=
chart_space
;
var
oBBox
=
oSparkline
.
sqref
;
this
.
col
=
oBBox
.
c1
;
...
...
@@ -456,10 +497,10 @@ CSparklineView.prototype.draw = function(graphics)
graphics
.
m_oCoordTransform
.
tx
=
x
;
graphics
.
m_oCoordTransform
.
ty
=
y
;
var
_l
=
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
_left
;
/*
var _l = this.chartSpace.chartObj.calcProp.chartGutter._left;
var _t = this.chartSpace.chartObj.calcProp.chartGutter._top;
var _r = this.chartSpace.chartObj.calcProp.chartGutter._right;
var
_b
=
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
_bottom
;
var _b = this.chartSpace.chartObj.calcProp.chartGutter._bottom;
*/
var
_true_height
=
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
trueHeight
;
var
_true_width
=
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
trueWidht
;
...
...
@@ -469,17 +510,17 @@ CSparklineView.prototype.draw = function(graphics)
this
.
chartSpace
.
chartObj
.
calcProp
.
trueHeight
=
this
.
chartSpace
.
extY
*
this
.
chartSpace
.
chartObj
.
calcProp
.
pxToMM
;
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
_left
=
0
;
/*
this.chartSpace.chartObj.calcProp.chartGutter._left = 0;
this.chartSpace.chartObj.calcProp.chartGutter._top = 0;
this.chartSpace.chartObj.calcProp.chartGutter._right = 0;
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
_bottom
=
0
;
this.chartSpace.chartObj.calcProp.chartGutter._bottom = 0;
*/
this
.
chartSpace
.
draw
(
graphics
);
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
_left
=
_l
;
/*
this.chartSpace.chartObj.calcProp.chartGutter._left = _l;
this.chartSpace.chartObj.calcProp.chartGutter._top = _t;
this.chartSpace.chartObj.calcProp.chartGutter._right = _r;
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
_bottom
=
_b
;
this.chartSpace.chartObj.calcProp.chartGutter._bottom = _b;
*/
this
.
chartSpace
.
chartObj
.
calcProp
.
trueWidht
=
_true_width
;
this
.
chartSpace
.
chartObj
.
calcProp
.
trueHeight
=
_true_height
;
...
...
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