Sign in to follow this  
Guest Madhumita

Sync time on x axis for two charts on same page.

Recommended Posts

I want to have two charts in one page.

 

Above should be a multi line chart and below is a Gantt Chart.(Image attached)

 

The Gantt Chart shows 24 hour time range.(for example from 10/02/2010 (Midnight 12am) to 11/02/2010 (Midnight 12am)).

 

The multi line chart has time duration in x axis.

 

The time duration for multi line chart is exactly same as that for Gantt chart.

 

The time shown on multi line chart should be in sync with Gantt Chart.

 

Means when seen vertically top to bottom both multi line chart and Gantt chart should show the same point of time.

 

Means when its 3:15 am for Gantt it should be 3:15 am for multi line,when its 2:31 pm for Gantt it should be 2:31pm for multi line.

 

Please suggest some solution for this.

 

 

 

One possible thing I could think of was to set canvasLeftMargin of multi line chart = chartLeftMargin of Gantt+process width of Gantt.

 

Also to set chartRightMargin of Gantt = chartRightMargin of multi line.

 

 

 

Please suggest some solution.

post-7792-128441580747_thumb.jpg

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

 

 

 

You can use the Paddings and Margin properties of the first chart to align with the datalabels of the second chart.

 

 

 

ref. - http://www.fusioncharts.com/docs/Contents/ChartSS/MSLine.html#Anchor6

 

http://www.fusioncharts.com/docs/Contents/AttDesc/Padding.html

 

 

 

You have to do a permutation and combination of the attributes explained to get the desired result.

 

 

 

In case you need further assistance you can send us the exact codes you are using so that we can try and find a solution to the issue.

Share this post


Link to post
Share on other sites

"A permutation and combination of the attributes explained".

 

I read the attributes and could possibly think of only the folllowing :

 

canvasLeftMargin of multi line chart should be made equal to the sum of chartLeftMargin and processWidth of Gantt Chart.

 

But when I am trying to do this the increasing of process width of Gantt chart shows no effect on Gantt Chart.

 

I have raised a seperate query for this

 

 

 

http://www.fusioncharts.com/forum/Topic23958-15-1.aspx

 

 

 

Can you please help in this case or provide some alternate solution.

 

 

 

I cannot provide the exact code.

 

But I am providing the dataXml (generated by script).

 

You can run the chart provided in attached zip.

 

Please suggest what changes should be made in these data xmls so that the time of two charts are in sync.

 

You can see the time for multi line chart on tool tips.

 

I will make the appropriate changes in code to reflect in xml.

 

 

 

Thanks.

Chart.zip

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Could you please try setting chartLeftMargin='45' in the <chart> element and see if this helps?

Looking forward to your reply. :)

Share this post


Link to post
Share on other sites

Yes this made it positioned correctly.

 

But it is for this particular case only.

 

If the width of process label gets increased due to some lengthy process name the charts will

 

again get misaligned.

 

Thats why I wanted to specify a fixed process width value and then making canvasLeftMargin of multi line chart to be equal to chartLeftMargin + process width of Gantt chart.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this