A real challenge: Create a Gantt-chart-like chart

G

gnewsgroup

In one web form of my web application, I need to create a chart like
what's shown here:

http://gnewsgroup.googlepages.com/achartwhichisextremelyhardtocreate

It's like a Gantt chart, and has to be created on the fly depending on
the data retrieved from the database.

This screen shot is from a hard-coded HTML with CSS formatting.

It's too cumbersome to do this stuff in graphics programming, but is
it reliable to do it using HTML and CSS, given that the duration of a
project has to be aligned with the timestamp?

I would like to hear your comments about this task. Thank you very
much.
 
M

Mark Rae [MVP]

I would like to hear your comments about this task.

There are all sorts of intricate ways you can do this by changing the width
of images, etc...

However, such things always look unbelievably amateur, just like the
hyperlink that you provided...

Do yourself a huge favour and get hold of a 3rd-party charting add-in for
ASP.NET - there are literally hundreds of these, some of which are free, and
you'll be up and running in minutes rather than days.

I use this: http://www.advsofteng.com/cdnet.html
 
G

gnewsgroup

There are all sorts of intricate ways you can do this by changing the width
of images, etc...

However, such things always look unbelievably amateur, just like the
hyperlink that you provided...

I very much agree.
Do yourself a huge favour and get hold of a 3rd-party charting add-in for
ASP.NET - there are literally hundreds of these, some of which are free, and
you'll be up and running in minutes rather than days.

I use this:http://www.advsofteng.com/cdnet.html

It so happens that I have already been using chartdirector for a while
for gant chart. Looks like I need to delve deeper into chartdirector.

That said, I was wondering if the whole thing can be developed using
HTML and css only.

Thank you for your comments.
 
M

Mark Rae [MVP]

It so happens that I have already been using chartdirector for a while
for gant chart. Looks like I need to delve deeper into chartdirector.
Indeed.

That said, I was wondering if the whole thing can be developed using
HTML and css only.

I'm sure it can - but, other than perhaps as a learning exercise, why would
you want to...?
 
K

Kevin Spencer

Not that hard to do, really. You don't need any images, just HTML elements
with CSS. The "background" would be a straightforward HTML table. You would
use a fixed pixel size for the width. For the bars in the foreground, you
would use absolutely positioned divs, with colored backgrounds, and ZIndex >
0. The sizes of these divs would be whatever height you want to assign them
(in pixels) and the width determined by the length of the time period
specified, relative to the width of the chart. The locations of them would
similarly be determined by the starting point relative to the width of the
chart, and the distance down from the top of the chart for each succcessive
div.

It would not be difficult to make the entire thing a Web Server Control that
generates the HTML and CSS dynamically, for use with any web application.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top