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
7111d0b5
Commit
7111d0b5
authored
Jun 01, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправлен баг с неправильным расчетом значений горизонтальной оси для диаграмм
parent
1c0ad3d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
83 deletions
+92
-83
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+92
-83
No files found.
common/Charts/ChartsDrawer.js
View file @
7111d0b5
...
...
@@ -1252,14 +1252,22 @@ CChartsDrawer.prototype =
{
//chartProp.chart.plotArea.valAx.scaling.logBase
var
axisMin
,
axisMax
,
firstDegree
,
step
,
arrayValues
;
if
(
chartProp
.
chart
.
plotArea
.
valAx
&&
chartProp
.
chart
.
plotArea
.
valAx
.
scaling
.
logBase
)
{
arrayValues
=
this
.
_getLogArray
(
yMin
,
yMax
,
chartProp
.
chart
.
plotArea
.
valAx
.
scaling
.
logBase
);
return
arrayValues
;
if
(
!
(
'
Scatter
'
==
this
.
calcProp
.
type
&&
isOx
)){
if
(
chartProp
.
chart
.
plotArea
.
valAx
&&
chartProp
.
chart
.
plotArea
.
valAx
.
scaling
.
logBase
)
{
arrayValues
=
this
.
_getLogArray
(
yMin
,
yMax
,
chartProp
.
chart
.
plotArea
.
valAx
.
scaling
.
logBase
);
return
arrayValues
;
}
}
else
{
if
(
chartProp
.
chart
.
plotArea
.
catAx
&&
chartProp
.
chart
.
plotArea
.
catAx
.
scaling
&&
chartProp
.
chart
.
plotArea
.
catAx
.
scaling
.
logBase
)
{
arrayValues
=
this
.
_getLogArray
(
yMin
,
yMax
,
chartProp
.
chart
.
plotArea
.
catAx
.
scaling
.
logBase
);
return
arrayValues
;
}
}
chartProp
.
chart
.
plotArea
.
valAx
&&
chartProp
.
chart
.
plotArea
.
valAx
.
scaling
?
chartProp
.
chart
.
plotArea
.
valAx
.
scaling
.
max
:
null
;
//максимальное и минимальное значение(по документации excel)
var
trueMinMax
=
this
.
_getTrueMinMax
(
isOx
,
yMin
,
yMax
);
...
...
@@ -1309,11 +1317,12 @@ CChartsDrawer.prototype =
//приводим к первому порядку
firstDegree
=
this
.
_getFirstDegree
((
Math
.
abs
(
axisMax
-
axisMin
))
/
10
);
var
axis
=
'
Scatter
'
==
this
.
calcProp
.
type
&&
isOx
?
chartProp
.
chart
.
plotArea
.
catAx
:
chartProp
.
chart
.
plotArea
.
valAx
;
//находим шаг
if
(
chartProp
.
chart
.
plotArea
.
valAx
&&
chartProp
.
chart
.
plotArea
.
valAx
.
majorUnit
!==
null
)
if
(
axis
&&
axis
.
majorUnit
!==
null
)
{
step
=
chartProp
.
chart
.
plotArea
.
valAx
.
majorUnit
;
step
=
axis
.
majorUnit
;
}
else
{
...
...
@@ -2827,7 +2836,7 @@ drawBarChart.prototype =
if
(
seria
.
length
)
seriesCounter
++
;
}
if
(
this
.
cChartDrawer
.
nDimensionCount
===
3
)
{
this
.
sortZIndexPaths
.
sort
(
function
sortArr
(
a
,
b
)
...
...
@@ -3047,10 +3056,10 @@ drawBarChart.prototype =
unfront
:
5
};
var
drawVerges
=
function
(
i
,
j
,
paths
,
onlyLessNull
,
start
,
stop
)
var
drawVerges
=
function
(
i
,
j
,
paths
,
onlyLessNull
,
start
,
stop
)
{
var
brush
,
pen
,
options
;
options
=
t
.
_getOptionsForDrawing
(
i
,
j
,
onlyLessNull
);
options
=
t
.
_getOptionsForDrawing
(
i
,
j
,
onlyLessNull
);
if
(
options
!==
null
)
{
pen
=
options
.
pen
;
...
...
@@ -3058,7 +3067,7 @@ drawBarChart.prototype =
for
(
var
k
=
start
;
k
<=
stop
;
k
++
)
{
t
.
_drawBar3D
(
paths
[
k
],
pen
,
brush
,
k
);
t
.
_drawBar3D
(
paths
[
k
],
pen
,
brush
,
k
);
}
}
};
...
...
@@ -3649,80 +3658,80 @@ drawLineChart.prototype =
_drawLines3D
:
function
()
{
var
t
=
this
;
var
drawVerges
=
function
(
j
,
i
,
onlyLessNull
)
{
var
t
=
this
;
var
drawVerges
=
function
(
j
,
i
,
onlyLessNull
)
{
var
brush
,
pen
,
seria
;
seria
=
t
.
chartProp
.
series
[
j
];
seria
=
t
.
chartProp
.
series
[
j
];
brush
=
seria
.
brush
;
pen
=
seria
.
pen
;
if
(
!
(
!
t
.
paths
.
series
[
j
]
||
!
t
.
paths
.
series
[
j
][
i
]
||
!
seria
.
val
.
numRef
.
numCache
.
pts
[
i
]))
{
if
(
seria
.
val
.
numRef
.
numCache
.
pts
[
i
].
pen
)
pen
=
seria
.
val
.
numRef
.
numCache
.
pts
[
i
].
pen
;
if
(
seria
.
val
.
numRef
.
numCache
.
pts
[
i
].
brush
)
brush
=
seria
.
val
.
numRef
.
numCache
.
pts
[
i
].
brush
;
for
(
var
k
=
0
;
k
<
t
.
paths
.
series
[
j
][
i
].
length
;
k
++
)
{
t
.
_drawLine3D
(
t
.
paths
.
series
[
j
][
i
][
k
],
pen
,
brush
,
k
);
}
}
};
//рисуем по сериям
var
onSeries
=
function
(
onlyLessNull
)
{
var
drawNeedVerge
=
function
()
{
for
(
var
j
=
0
;
j
<
t
.
paths
.
series
.
length
;
j
++
)
{
for
(
var
i
=
0
;
i
<
t
.
chartProp
.
ptCount
;
i
++
)
{
drawVerges
(
j
,
i
,
onlyLessNull
);
}
}
};
drawNeedVerge
();
};
var
reverseSeriesOnSeries
=
function
(
onlyLessNull
)
{
var
drawNeedVerge
=
function
()
{
for
(
var
j
=
t
.
paths
.
series
.
length
-
1
;
j
>=
0
;
j
--
)
{
if
(
!
t
.
paths
.
series
)
return
;
for
(
var
i
=
0
;
i
<
t
.
chartProp
.
ptCount
;
i
++
)
{
drawVerges
(
j
,
i
,
onlyLessNull
);
}
}
};
drawNeedVerge
();
};
if
(
!
this
.
cChartDrawer
.
processor3D
.
view3D
.
rAngAx
)
{
var
angle
=
Math
.
abs
(
this
.
cChartDrawer
.
processor3D
.
angleOy
);
if
(
angle
>
Math
.
PI
/
2
&&
angle
<
3
*
Math
.
PI
/
2
)
onSeries
();
else
reverseSeriesOnSeries
();
}
else
{
reverseSeriesOnSeries
();
if
(
!
(
!
t
.
paths
.
series
[
j
]
||
!
t
.
paths
.
series
[
j
][
i
]
||
!
seria
.
val
.
numRef
.
numCache
.
pts
[
i
]))
{
if
(
seria
.
val
.
numRef
.
numCache
.
pts
[
i
].
pen
)
pen
=
seria
.
val
.
numRef
.
numCache
.
pts
[
i
].
pen
;
if
(
seria
.
val
.
numRef
.
numCache
.
pts
[
i
].
brush
)
brush
=
seria
.
val
.
numRef
.
numCache
.
pts
[
i
].
brush
;
for
(
var
k
=
0
;
k
<
t
.
paths
.
series
[
j
][
i
].
length
;
k
++
)
{
t
.
_drawLine3D
(
t
.
paths
.
series
[
j
][
i
][
k
],
pen
,
brush
,
k
);
}
}
};
//рисуем по сериям
var
onSeries
=
function
(
onlyLessNull
)
{
var
drawNeedVerge
=
function
()
{
for
(
var
j
=
0
;
j
<
t
.
paths
.
series
.
length
;
j
++
)
{
for
(
var
i
=
0
;
i
<
t
.
chartProp
.
ptCount
;
i
++
)
{
drawVerges
(
j
,
i
,
onlyLessNull
);
}
}
};
drawNeedVerge
();
};
var
reverseSeriesOnSeries
=
function
(
onlyLessNull
)
{
var
drawNeedVerge
=
function
()
{
for
(
var
j
=
t
.
paths
.
series
.
length
-
1
;
j
>=
0
;
j
--
)
{
if
(
!
t
.
paths
.
series
)
return
;
for
(
var
i
=
0
;
i
<
t
.
chartProp
.
ptCount
;
i
++
)
{
drawVerges
(
j
,
i
,
onlyLessNull
);
}
}
};
drawNeedVerge
();
};
if
(
!
this
.
cChartDrawer
.
processor3D
.
view3D
.
rAngAx
)
{
var
angle
=
Math
.
abs
(
this
.
cChartDrawer
.
processor3D
.
angleOy
);
if
(
angle
>
Math
.
PI
/
2
&&
angle
<
3
*
Math
.
PI
/
2
)
onSeries
();
else
reverseSeriesOnSeries
();
}
else
{
reverseSeriesOnSeries
();
}
},
...
...
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