Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
ASP.Net WebForms::ThinWebClient: Export Chart as a picture
ASP.Net WebForms::ThinWebClient: Export Chart as a picture
Post Reply
ASP
.
Net
WebForms
::
ThinWebClient
:
Export
Chart
as
a
picture
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
joern kunze
joern kunze
posted 8 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 86,
Visits: 221
Hi
Experts
,
I
want
to
export
the
chart
as
a
picture
.
Using
the
Chart
-
build
-
in
buttons
works
fine
:
NThinChartControl1
.
Toolbar
.
Items
.
Add
(
new
NToolbarButton
(
new
NSaveImageAction
(
DateTime
.
Now
.
ToString
( "
yyyyMMdd_HHmmss
") + "
__Chart
",
new
NPngImageFormat
(),
true
,
new
NSize
(
0
,
0
),
96
)));
But
I
want
tu
use
my
own
Button
-
Control
to
export
the
image
.
I
tried
to
use
the
&
nbsp
;
NThinChartControl1
.
ImageExporter
.
SaveToFile
-
function
.
Basically
it
is
working
-
but
the
exported
picture
shows
only
the
X
/
Y
Axis
and
no
data
at
all
:
What
must
be
done
to
get
also
the
data
?
Furthermore
,
I
would
like
to
toggle
DataZoomToolAction
&
lt
;-&
gt
;
DataPanToolAction
functions
also
from
my
own
button
-
control
.
How
can
I
do
this
?
When
I
use
the
build
-
in
-
buttons
it
is
working
:
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NThinChartControl1
.
Toolbar
.
Items
.
Add
(
new
NToolbarButton
(
new
NToggleDataZoomToolAction
()));
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NThinChartControl1
.
Toolbar
.
Items
.
Add
(
new
NToolbarButton
(
new
NToggleDataPanToolAction
()));
Thanks
for
your
help
,
Best
regards
,
Joern
Tags
ASP
.
Net
Export
ThinWebClient
WebForms
Reply
Like
0
joern kunze
joern kunze
posted 8 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 86,
Visits: 221
...
after
restarting
the
computer
,
the
exported
picture
now
shows
also
the
contents
-
I
hope
it
stays
that
way
:-)
So
just
the
question
how
to
get
the
build
-
in
toggle
functionality
:
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NThinChartControl1
.
Toolbar
.
Items
.
Add
(
new
NToolbarButton
(
new
&
nbsp
;
NToggleDataZoomToolAction
()));
&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;&
nbsp
;
NThinChartControl1
.
Toolbar
.
Items
.
Add
(
new
NToolbarButton
(
new
&
nbsp
;
NToggleDataPanToolAction
()));
with
an
own
button
-
control
remains
.
How
can
I
do
that
?
Reply
Like
0
Nevron Support
Nevron Support
posted 8 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi
Joern
,
You
can
take
a
look
at
the
ThinWeb
\
Toolbar
example
which
shows
how
to
create
toolbar
buttons
with
custom
implemented
actions
.
We
'
re
also
attaching
the
build
in
commands
implementation
in
the
chart
as
a
reference
implementation
.
In
general
what
you
need
to
implement
in
order
to
have
a
custom
action
in
the
toolbar
is
:
1
.
Implement
a
class
that
derives
from
NAction
or
NCheckAction
and
override
the
methods
that
get
the
button
image
,
whether
the
button
is
enabled
/
checked
and
then
return
the
client
side
script
executed
when
the
button
is
pressed
.
2
.
Implement
a
custom
command
class
which
handles
the
custom
request
at
the
server
.
Both
those
steps
are
illustrated
in
the
example
-
you
can
also
take
a
look
at
the
following
topics
in
the
documentation
:
http
://
helpdotnetvision
.
nevron
.
com
/#
ThinWeb_Custom_Commands
.
html
http
://
helpdotnetvision
.
nevron
.
com
/#
ThinWeb_Custom_Requests
.
html
Hope
this
helps
-
let
us
know
if
you
meet
any
problems
or
have
any
questions
.
Best Regards,
Nevron Support Team
Attachments
ThinWebActions.zip
(
576 views,
13.00 KB
)
Reply
Like
0
joern kunze
joern kunze
posted 8 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 86,
Visits: 221
...
thanks
for
the
description
-
unfortunatly
I
coulndt
get
it
running
that
way
-
probably
due
to
my
limited
understanding
of
the
necessary
inheritance
and
postback
-
mechanisms
.
I
found
another
workaround
:
is
there
anything
wrong
with
this
approach
or
should
it
be
as
good
as
your
proposed
solution
?
Reply
Like
0
Nevron Support
Nevron Support
posted 8 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi
Joern
,
It
is
perfectly
Ok
to
Enable
/
Disable
tools
when
you
need
to
switch
between
them
-
we
don
'
t
see
any
problem
with
that
.
Best Regards,
Nevron Support Team
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
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search