Solved

Graphs in vb.net

Posted on 2008-06-16
4
961 Views
Last Modified: 2013-11-26
We generate Line Graphs in Encapsulated post script  for our customer data. It has many customized fields like showing calculated value at the top right of the graph,  displaying only few data points (like max and min values)  in the line as well as in the x & y axis, bottom labels etc., is it possible to generate the same graph in vb.net ? since our requirement is a finer vector line graphs, i have not seen any controls in vb.net which can produce such finer lines.  I have attached the Script file as well as the screen shot of the graph in JPEG format.
%!PS-Adobe-2.0 EPSF-1.2

%%BoundingBox: 201 848 318 940

%%DocumentFonts: Times new roman

%%DocumentProcessColors: Cyan Magenta Yellow Black

%%EndComments

%%BeginProcSet: adobe_DPSrectanglepack 1.0

/rectfill where { pop }{ %ifelse

	/*buildrect {

		dup type /integertype eq 1 index type /realtype eq or { %ifelse

			4 -2 roll moveto dup 0 exch rlineto

			exch 0 rlineto neg 0 exch rlineto

			closepath

		}{ %else

			dup type /arraytype eq {

				aload length 4 div  cvi { %repeat

					*buildrect

				} repeat

			} if

		} ifelse

	} bind def

	/rectfill { %def

		gsave *buildrect fill grestore

	} bind def

	/rectstroke { %def

		gsave *buildrect stroke grestore

	} bind def

	/rectclip { %def

		newpath *buildrect clip closepath

	} bind def

} ifelse

%%EndProcSet: adobe_DPSrectanglepack 1.0

%%EndProlog

gsave 0 0 0 0 setcmykcolor 201 848 117 92 rectfill

grestore

0.3 setlinewidth 0 0 0 0 0.5 setcmykcolor

217.5 858.5 moveto 0 64 rlineto stroke

217.5 858.5 moveto 100 0 rlineto stroke

/Times new roman findfont 6 scalefont setfont

218 851 moveto gsave 0 setgray (From) show grestore

288 851 moveto gsave 0 setgray (To) show grestore

/Times new roman findfont 9 scalefont setfont

204 930 moveto gsave 0 setgray (Header) show grestore

/Times new roman findfont 6 scalefont setfont

205 858 moveto gsave 0 setgray  (180) show grestore

205 870.5 moveto gsave 0 setgray  (200) show grestore

205 883 moveto gsave 0 setgray  (220) show grestore

205 895.5 moveto gsave 0 setgray  (240) show grestore

205 908 moveto gsave 0 setgray  (260) show grestore

205 920.5 moveto gsave 0 setgray  (280) show grestore

/Times new roman findfont 6 scalefont setfont

291 930 moveto gsave 0 setgray ($.24) show grestore

/Times new roman findfont 6 scalefont setfont

282 923 moveto gsave 0 setgray (Calculated 14%) show grestore

1.5 setlinewidth 0.1 0 0.1 0 setcmykcolor

218 859 moveto

219.00 870.41 lineto

221.44 868.43 lineto

223.88 875.10 lineto

226.32 882.45 lineto

228.76 883.09 lineto

231.20 879.98 lineto

233.64 872.29 lineto

236.08 867.75 lineto

238.52 865.46 lineto

240.96 872.96 lineto

243.40 877.05 lineto

245.84 882.19 lineto

248.28 883.24 lineto

250.72 887.21 lineto

253.16 883.24 lineto

255.60 879.19 lineto

258.04 882.68 lineto

260.48 877.76 lineto

262.92 882.00 lineto

265.36 891.30 lineto

267.80 891.98 lineto

270.24 891.23 lineto

272.68 894.15 lineto

275.12 889.13 lineto

277.56 886.73 lineto

280.00 881.70 lineto

282.44 879.94 lineto

284.88 890.74 lineto

287.32 896.55 lineto

289.76 909.11 lineto

292.20 886.46 lineto

294.64 894.30 lineto

297.08 883.65 lineto

299.52 888.00 lineto

301.96 889.80 lineto

304.40 874.65 lineto

306.84 885.34 lineto

309.28 881.25 lineto

311.72 884.36 lineto

314.16 895.58 lineto

316.60 891.15 lineto

316.60 859 lineto

closepath

fill

246 290 moveto 0.1 setlinewidth 0 0 0 0 setcmykcolor

237.5 859 moveto 0 62 rlineto stroke

257 859 moveto 0 62 rlineto stroke

277 859 moveto 0 62 rlineto stroke

296.5 859 moveto 0 62 rlineto stroke

0.1 setlinewidth 1 1 1 1 setcmykcolor

218 870.5 moveto 99 0 rlineto stroke

218 883 moveto 99 0 rlineto stroke

218 895.5 moveto 99 0 rlineto stroke

218 908  moveto 99 0 rlineto stroke

218 920.5  moveto 99 0 rlineto stroke

246 290 moveto 1.5 setlinewidth 0 1 0.6 0.3 setcmykcolor

219.00 870.41 moveto 2.44 -1.98 rlineto stroke

221.44 868.43 moveto 2.44 6.67 rlineto stroke

223.88 875.10 moveto 2.44 7.35 rlineto stroke

226.32 882.45 moveto 2.44 0.64 rlineto stroke

228.76 883.09 moveto 2.44 -3.11 rlineto stroke

231.20 879.98 moveto 2.44 -7.69 rlineto stroke

233.64 872.29 moveto 2.44 -4.54 rlineto stroke

236.08 867.75 moveto 2.44 -2.29 rlineto stroke

238.52 865.46 moveto 2.44 7.50 rlineto stroke

240.96 872.96 moveto 2.44 4.09 rlineto stroke

243.40 877.05 moveto 2.44 5.14 rlineto stroke

245.84 882.19 moveto 2.44 1.05 rlineto stroke

248.28 883.24 moveto 2.44 3.97 rlineto stroke

250.72 887.21 moveto 2.44 -3.97 rlineto stroke

253.16 883.24 moveto 2.44 -4.05 rlineto stroke

255.60 879.19 moveto 2.44 3.49 rlineto stroke

258.04 882.68 moveto 2.44 -4.92 rlineto stroke

260.48 877.76 moveto 2.44 4.24 rlineto stroke

262.92 882.00 moveto 2.44 9.30 rlineto stroke

265.36 891.30 moveto 2.44 0.68 rlineto stroke

267.80 891.98 moveto 2.44 -0.75 rlineto stroke

270.24 891.23 moveto 2.44 2.92 rlineto stroke

272.68 894.15 moveto 2.44 -5.02 rlineto stroke

275.12 889.13 moveto 2.44 -2.40 rlineto stroke

277.56 886.73 moveto 2.44 -5.03 rlineto stroke

280.00 881.70 moveto 2.44 -1.76 rlineto stroke

282.44 879.94 moveto 2.44 10.80 rlineto stroke

284.88 890.74 moveto 2.44 5.81 rlineto stroke

287.32 896.55 moveto 2.44 12.56 rlineto stroke

289.76 909.11 moveto 2.44 -22.65 rlineto stroke

292.20 886.46 moveto 2.44 7.84 rlineto stroke

294.64 894.30 moveto 2.44 -10.65 rlineto stroke

297.08 883.65 moveto 2.44 4.35 rlineto stroke

299.52 888.00 moveto 2.44 1.80 rlineto stroke

301.96 889.80 moveto 2.44 -15.15 rlineto stroke

304.40 874.65 moveto 2.44 10.69 rlineto stroke

306.84 885.34 moveto 2.44 -4.09 rlineto stroke

309.28 881.25 moveto 2.44 3.11 rlineto stroke

311.72 884.36 moveto 2.44 11.22 rlineto stroke

314.16 895.58 moveto 2.44 -4.43 rlineto stroke

Open in new window

graph.JPG
0
Comment
Question by:Vijayaraghavank
4 Comments
 
LVL 24

Accepted Solution

by:
Jeff Certain earned 125 total points
ID: 21792893
If you are looking to create something yourself, using standard System.Drawing functionality, you can set the size of the Pen object you use to draw lines.
Dim pen As New System.Drawing.Pen(Drawing.Color.Red, 1)

The last parameter is the pen width, and since it takes a single, it can be very, very small.

There are also lots of third-party charting/graphing tools that should allow you to set the line width.
0
 
LVL 6

Assisted Solution

by:Bruce_1975
Bruce_1975 earned 125 total points
ID: 21793028
Have a look at http://zedgraph.org/wiki/index.php?title=Main_Page
This OpenSource provides a powerfull graph library including form and web controls.

Regards,
Bruce
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now