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
b36eab66
Commit
b36eab66
authored
Mar 31, 2016
by
Sergey Luzyanin
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Обернул создание ChartSapce в ExecuteNoHistory
parent
fe5617ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
38 deletions
+42
-38
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+42
-38
No files found.
common/Charts/DrawingObjects.js
View file @
b36eab66
...
@@ -318,44 +318,45 @@ function CSparklineView()
...
@@ -318,44 +318,45 @@ function CSparklineView()
}
}
CSparklineView
.
prototype
.
initFromSparkline
=
function
(
oSparkline
,
oSparklineGroup
,
worksheetView
)
CSparklineView
.
prototype
.
initFromSparkline
=
function
(
oSparkline
,
oSparklineGroup
,
worksheetView
)
{
{
this
.
ws
=
worksheetView
;
ExecuteNoHistory
(
function
(){
var
settings
=
new
asc_ChartSettings
();
this
.
ws
=
worksheetView
;
switch
(
oSparklineGroup
.
type
)
var
settings
=
new
asc_ChartSettings
();
{
switch
(
oSparklineGroup
.
type
)
case
Asc
.
ESparklineType
.
Column
:
{
settings
.
type
=
c_oAscChartTypeSettings
.
barNormal
;
break
;
}
case
Asc
.
ESparklineType
.
Stacked
:
{
settings
.
type
=
c_oAscChartTypeSettings
.
barStacked
;
break
;
}
default
:
{
{
settings
.
type
=
c_oAscChartTypeSettings
.
lineNormal
;
case
Asc
.
ESparklineType
.
Column
:
break
;
{
settings
.
type
=
c_oAscChartTypeSettings
.
barNormal
;
break
;
}
case
Asc
.
ESparklineType
.
Stacked
:
{
settings
.
type
=
c_oAscChartTypeSettings
.
barStacked
;
break
;
}
default
:
{
settings
.
type
=
c_oAscChartTypeSettings
.
lineNormal
;
break
;
}
}
}
}
var
ser
=
new
asc_CChartSeria
();
ser
.
Val
.
Formula
=
oSparkline
.
f
;
var
ser
=
new
asc_CChartSeria
();
var
chartSeries
=
{
series
:
[
ser
],
parsedHeaders
:
{
bLeft
:
false
,
bTop
:
false
}};
ser
.
Val
.
Formula
=
oSparkline
.
f
;
var
chart_space
=
DrawingObjectsController
.
prototype
.
_getChartSpace
(
chartSeries
,
settings
,
true
);
var
chartSeries
=
{
series
:
[
ser
],
parsedHeaders
:
{
bLeft
:
false
,
bTop
:
false
}};
chart_space
.
setWorksheet
(
worksheetView
.
model
);
var
chart_space
=
DrawingObjectsController
.
prototype
.
_getChartSpace
(
chartSeries
,
settings
,
true
);
this
.
chartSpace
=
chart_space
;
chart_space
.
setWorksheet
(
worksheetView
.
model
);
var
oBBox
=
worksheetView
.
model
.
getCell
(
oSparkline
.
sqref
);
this
.
chartSpace
=
chart_space
;
this
.
col
=
oBBox
.
c1
;
var
oBBox
=
worksheetView
.
model
.
getCell
(
oSparkline
.
sqref
);
this
.
row
=
oBBox
.
r1
;
this
.
col
=
oBBox
.
c1
;
this
.
extX
=
worksheetView
.
getColumnWidth
(
oBBox
.
c1
,
3
);
this
.
row
=
oBBox
.
r1
;
this
.
extY
=
worksheetView
.
getRowHeight
(
oBBox
.
r1
,
3
);
this
.
extX
=
worksheetView
.
getColumnWidth
(
oBBox
.
c1
,
3
);
CheckSpPrXfrm
(
this
.
chartSpace
);
this
.
extY
=
worksheetView
.
getRowHeight
(
oBBox
.
r1
,
3
);
this
.
chartSpace
.
spPr
.
xfrm
.
setOffX
(
0
);
CheckSpPrXfrm
(
this
.
chartSpace
);
this
.
chartSpace
.
spPr
.
xfrm
.
setOffY
(
0
);
this
.
chartSpace
.
spPr
.
xfrm
.
setOffX
(
0
);
this
.
chartSpace
.
spPr
.
xfrm
.
setExtX
(
this
.
extX
);
this
.
chartSpace
.
spPr
.
xfrm
.
setOffY
(
0
);
this
.
chartSpace
.
spPr
.
xfrm
.
setExtY
(
this
.
extY
);
this
.
chartSpace
.
spPr
.
xfrm
.
setExtX
(
this
.
extX
);
this
.
chartSpace
.
recalculate
();
this
.
chartSpace
.
spPr
.
xfrm
.
setExtY
(
this
.
extY
);
},
this
,
[]);
this
.
chartSpace
.
recalculate
();
};
};
CSparklineView
.
prototype
.
draw
=
function
(
graphics
)
CSparklineView
.
prototype
.
draw
=
function
(
graphics
)
...
@@ -366,14 +367,17 @@ CSparklineView.prototype.draw = function(graphics)
...
@@ -366,14 +367,17 @@ CSparklineView.prototype.draw = function(graphics)
var
extY
=
this
.
ws
.
getRowHeight
(
this
.
row
,
3
);
var
extY
=
this
.
ws
.
getRowHeight
(
this
.
row
,
3
);
if
(
Math
.
abs
(
this
.
extX
-
extX
)
>
0.01
||
Math
.
abs
(
this
.
extY
-
extY
)
>
0.01
)
if
(
Math
.
abs
(
this
.
extX
-
extX
)
>
0.01
||
Math
.
abs
(
this
.
extY
-
extY
)
>
0.01
)
{
{
this
.
chartSpace
.
spPr
.
xfrm
.
setExtX
(
extX
);
ExecuteNoHistory
(
function
(){
this
.
chartSpace
.
spPr
.
xfrm
.
setExtY
(
extY
);
this
.
chartSpace
.
spPr
.
xfrm
.
setExtX
(
extX
);
this
.
chartSpace
.
spPr
.
xfrm
.
setExtY
(
extY
);
},
this
,
[]);
this
.
extX
=
extX
;
this
.
extX
=
extX
;
this
.
extY
=
extY
;
this
.
extY
=
extY
;
this
.
chartSpace
.
recalculate
();
this
.
chartSpace
.
recalculate
();
}
}
graphics
.
m_oCoordTransform
.
tx
=
x
;
graphics
.
m_oCoordTransform
.
tx
=
x
;
graphics
.
m_oCoordTransform
.
ty
=
y
;
graphics
.
m_oCoordTransform
.
ty
=
y
;
this
.
chartSpace
.
draw
(
graphics
);
};
};
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
...
...
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