Jump to content
Software FX Community

Synchronising charts is causing me no end of headaches!


User (Legacy)

Recommended Posts

I have a web page with a time-line chart (stacked Gantt) placed directly

above a bar chart. The horizontal axes of these two charts is the same date

range and must be in perfect sync. I have a vertical line (drawn using

javascript) that follows the mouse cursor and is used to align points on the

two charts. My problem is that I am unable to perfectly align the two

charts.

The main issue is that the horizontal axis on the Gantt chart is the Y-axis

whereas on the bar chart the horizontal axis is the X-axis. On the Gantt

chart, the start date of the date range is postioned at the origin whereas

on the bar chart it is positioned to the right of the origin (in order to

allow for the thickness of a bar). So an obvious thing to do might be to

ensure that the Gantt chart is centered over the bar chart and with a

slightly smaller width. However there are problems here. The difference in

width of the two charts is dependent on the size of the date range (and

therefore the width of a bar on the bar chart), and therefore the width of

the Gantt chart must be varied in relation to the size of the specified date

range on the horizontal axes.

I have tried using the RightGap, LeftGap, Width, and ImgWidth properties of

the Gantt chart but no matter what I do I cannot get consistent results.

Suggestions welcome.

--

Attachments.zip

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...