Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Anderson, Danny H
gist-charts
Commits
755555f6
Commit
755555f6
authored
Oct 05, 2018
by
David Anderson
Browse files
area chart now detects if fill axis or axis origin are needed but not set
parent
b367d577
Changes
1
Hide whitespace changes
Inline
Side-by-side
gist-charts/source/implementations/charts/areaChartImplementation.class.ts
View file @
755555f6
...
...
@@ -84,6 +84,14 @@ export class AreaChartImplementation extends BaseChartImplementation {
const
ctx
=
me
.
canvas
.
context
;
let
startingIndex
=
me
.
drawnData
.
length
;
const
list
=
me
.
chart
.
datalist
();
if
(
me
.
chart
.
shouldFillToOrigin
)
{
if
(
!
me
.
chart
.
fillAxis
)
{
throw
'
GistCharts: AreaChart Usage Error. If shouldFillToOrigin is true than fillAxis must also be defined
'
;
}
if
(
!
me
.
chart
.
axisOrigin
)
{
throw
'
GistCharts: AreaChart Usage Error. If shouldFillToOrigin is true than axisOrigin must also be defined
'
;
}
}
while
(
me
.
drawnData
.
length
<
list
.
length
&&
me
.
drawnData
.
length
-
startingIndex
<
me
.
chart
.
drawCountPerRender
)
{
let
line
=
me
.
processLine
(
list
[
me
.
drawnData
.
length
]
);
ctx
.
beginPath
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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