Nevron Forum
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
Setting Display Date Range for NRangeTimelineScaleConfigurator?
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
Setting Display Date Range for NRangeTimelineScaleConfigurator?
Setting Display Date Range for NRangeTimelineScaleConfigurator?
Post Reply
Setting
Display
Date
Range
for
NRangeTimelineScaleConfigurator
?
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Matthew Crider
Matthew Crider
posted 3 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 0,
Visits: 78
I
am
using
a
NRangeTimelineScaleConfigurator
object
to
configure
the
X
axis
of
a
chart
.
I
am
plotting
data
that
is
dated
from
1976
through
2007
.
When
I
plot
OHLC
data
with
this
data
set
,
the
X
axis
is
correctly
set
to
the
date
range
of
my
data
set
--
1976
to
2007
.
However
,
when
I
plot
an
Area
chart
or
a
Line
chart
with
this
same
data
set
,
the
display
of
the
X
axis
starts
at
the
year
1900
.
How
do
I
tell
the
X
axis
to
start
at
a
given
year
(
1976
,
in
my
case
)
when
plotting
an
Area
or
Line
chart
?
&
nbsp
; /// &
lt
;
summary
&
gt
;
&
nbsp
;&
nbsp
; ///
Set
up
the
X
axis
chart
a
Cartesian
chart
.
&
nbsp
;&
nbsp
; /// &
lt
;/
summary
&
gt
;
&
nbsp
;&
nbsp
; /// &
lt
;
param
name
="
chart
"&
gt
;
&
nbsp
;&
nbsp
; ///
The
Cartesian
chart
for
which
its
X
axis
should
be
set
up
.
&
nbsp
;&
nbsp
; /// &
lt
;/
param
&
gt
;
&
nbsp
;&
nbsp
;
public
void
SetUpXAxis
(
NCartesian
Chart
chart
)
&
nbsp
;&
nbsp
; {
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
var
xAxisConfigurator
=
new
NRangeTimelineScaleConfigurator
();
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
FirstRow
.
GridStyle
.
ShowAtWalls
=
new
Chart
WallType
[] {
Chart
WallType
.
Back
};
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
FirstRow
.
GridStyle
.
LineStyle
=
new
NStrokeStyle
(
1
,
Color
.
FromArgb
(
225
,
225
,
225
));
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
FirstRow
.
UseGridStyle
=
true
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
SecondRow
.
GridStyle
.
ShowAtWalls
=
new
Chart
WallType
[] {
Chart
WallType
.
Back
};
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
SecondRow
.
GridStyle
.
LineStyle
=
new
NStrokeStyle
(
1
,
Color
.
FromArgb
(
215
,
215
,
215
));
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
SecondRow
.
UseGridStyle
=
true
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
ThirdRow
.
GridStyle
.
ShowAtWalls
=
new
Chart
WallType
[] {
Chart
WallType
.
Back
};
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
ThirdRow
.
GridStyle
.
LineStyle
=
new
NStrokeStyle
(
1
,
Color
.
FromArgb
(
205
,
205
,
205
));
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
ThirdRow
.
UseGridStyle
=
true
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
AutoDateTimeUnits
=
new
NDateTimeUnit
[]
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;{
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NDateTimeUnit
.
Century
,
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NDateTimeUnit
.
Decade
,
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NDateTimeUnit
.
Year
,
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NDateTimeUnit
.
Quarter
,
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NDateTimeUnit
.
Month
,
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NDateTimeUnit
.
Week
,
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NDateTimeUnit
.
Day
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;};
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
xAxisConfigurator
.
EnableCalendar
=
true
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
Axis
(
StandardAxis
.
PrimaryX
).
ScaleConfigurator
=
xAxisConfigurator
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
Axis
(
StandardAxis
.
PrimaryX
).
ScrollBar
.
ResetButton
.
Visible
=
false
;
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
Axis
(
StandardAxis
.
PrimaryX
).
PagingView
=
new
NNumericAxisPagingView
(
new
NRange1DD
(
0
,
20
));
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
chart
.
Axis
(
StandardAxis
.
PrimaryX
).
ScrollBar
.
Visible
=
true
;
&
nbsp
;&
nbsp
; }
Reply
Like
0
Nevron Support
Nevron Support
posted 3 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi
,
Most
likely
the
series
Area
/
Line
series
is
not
configured
to
use
X
values
-
that
'
s
why
they
start
from
0
value
which
corresponds
to
1990
in
the
date
-
time
format
.
To
configure
the
series
to
use
X
values
you
can
use
:
someSeries
.
UseXValues
=
true
;
then
you
need
to
provide
the
x
values
as
well
:
someSeries
.
XValues
.
Add
(
someDateTime
.
ToOADate
());
We
hope
this
helps
-
let
us
know
if
you
have
any
questions
.
Best Regards,
Nevron Support Team
Reply
Like
0
Matthew Crider
Matthew Crider
posted 3 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 0,
Visits: 78
Yes
,
it
works
now
.
I
forgot
to
tell
the
area
series
to
use
the
X
values
.
Everything
is
now
as
expected
.
Thank
you
!
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
1 active, 1 guest, 0 members, 0 anonymous
No members currently viewing this topic!
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search