Plot multiple charts dynamically on a single web page.
Plot multiple charts dynamically on a single web page.
Hi, I am using TeeChart Pro Activex Control v8 and trying to draw multiple charts on the fly depending on the number and values got from db. Zooming on any chart should get reflected on all the charts displayed on the page at the same time. Need help with any sample project or any reference for the same.
Thanks and regards
Ashutosh
Thanks and regards
Ashutosh
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ashutosh,
You should do something as what I suggested here. This is a TeeChart for .NET thread but the same principle applies to the ActiveX version.
You should do something as what I suggested here. This is a TeeChart for .NET thread but the same principle applies to the ActiveX version.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Plot multiple charts dynamically on a single web page.
Dear Narcis,
Thanks for ypur response. I am working with VS2005 and TeeChart pro Actives v8. I am trying to plot multiple charts on client side at runtime using the Chart object. The earlier post was helpful for synchronous zooming but to draw multiple charts on a single page I need your help. Please let me know if i am not clear with my requirements.
Thanks
Ashutosh
Thanks for ypur response. I am working with VS2005 and TeeChart pro Actives v8. I am trying to plot multiple charts on client side at runtime using the Chart object. The earlier post was helpful for synchronous zooming but to draw multiple charts on a single page I need your help. Please let me know if i am not clear with my requirements.
Thanks
Ashutosh
Hi Ashutosh,
in case you want to create the Chart objects dinamically into the page you would have to use an script, like in the following example :
This allow you to have show page without any Chart object on it and then create them at runtime.
in case you want to create the Chart objects dinamically into the page you would have to use an script, like in the following example :
Code: Select all
<HTML>
<HEAD>
<SCRIPT>
var newTeeChart;
function createTeeChart(){
// Create teechart object with value="First Choice" and then insert
// this element into the document hierarchy.
newTeeChart = document.createElement("<OBJECT ID='TChart1' WIDTH='450' HEIGHT='290' CLASSID='CLSID:FAB9B41C-87D6-474D-AB7E-F07D78F2422E'></OBJECT>")
document.body.insertBefore(newTeeChart);
document.getElementById('test1').appendChild(newTeeChart);
}
function clearTitle(){
newTeeChart.Header.Text.Clear();
}
function setTitle(){
newTeeChart.Header.Text.Item(0)="title";
}
</SCRIPT>
</HEAD>
<BODY>
<div style="position: absolute; width: 425px; height: 219px; z-index: 1; left: 134px; top: 130px" id="test1">
</div>
<INPUT TYPE="BUTTON" ONCLICK="createTeeChart()" VALUE="Create a TeeChart Component"><BR>
<INPUT TYPE="BUTTON" ONCLICK="alert ( document.body.outerHTML )" VALUE="Click here to see HTML"><BR>
<INPUT TYPE="BUTTON" ONCLICK="clearTitle()" VALUE="Clear Chart Title"><BR>
<INPUT TYPE="BUTTON" ONCLICK="setTitle()" VALUE="Set Title"><BR>
<BODY>
</HTML>
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Narcis,
I am using a line series to assign value from database. As long as the data is a number there is no problem. I need to assign a date time value to the line series using addxy(double,double,string). Is there any way out that we can assign the date time value for the X axis.
Please help with the solution compatible for the web application with Activex control v8
Thanks and regards
Ashutosh
I am using a line series to assign value from database. As long as the data is a number there is no problem. I need to assign a date time value to the line series using addxy(double,double,string). Is there any way out that we can assign the date time value for the X axis.
Please help with the solution compatible for the web application with Activex control v8
Thanks and regards
Ashutosh
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ashutosh,
Yes, you can get a double value from a DateTime value like this:
Hope this helps!
Yes, you can get a double value from a DateTime value like this:
Code: Select all
double d = myDate.ToOADate();
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
That converts the date time value to double but displays the double value only for X axis whereas I need the DateTime value only for X axis.
One more point I seek your help for, Can we chamge the axis label to some other value say datetime equevalent at run time. I'll try to explain it:
I have assigned the points as label at the load of the chart later I am trying to change it to Date time equivalent value which is already there as the x axis value.
Please help.
Ashutosh
That converts the date time value to double but displays the double value only for X axis whereas I need the DateTime value only for X axis.
One more point I seek your help for, Can we chamge the axis label to some other value say datetime equevalent at run time. I'll try to explain it:
I have assigned the points as label at the load of the chart later I am trying to change it to Date time equivalent value which is already there as the x axis value.
Please help.
Ashutosh
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ashutosh,
For more information about axes settings please read Tutorial 4 - Axis Control. Tutorials can be found at TeeChart's program group.
Yes, then you need series to display DateTime XValues, for example:That converts the date time value to double but displays the double value only for X axis whereas I need the DateTime value only for X axis.
Code: Select all
TChart1.Series(0).XValues.DateTime = True
I'm not sure about what you are trying to achieve but you could try setting bottom axis labels to display X values as in previous answer you should have set them to be DateTime, for example:One more point I seek your help for, Can we chamge the axis label to some other value say datetime equevalent at run time. I'll try to explain it:
I have assigned the points as label at the load of the chart later I am trying to change it to Date time equivalent value which is already there as the x axis value.
Code: Select all
TChart1.Axis.Bottom.Labels.Style = talValue
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
I am using TeeChart Activex Control objeect and create the charts dynamically on load time. I am already using the onmousemove event and its working fine. I am trying to use the ondblclick event in the same manner. But this event is not being fired.
Please refer the below code for reference:
dvChart.Controls.Add(new LiteralControl("<object id='TChart" + Index + "' style='width: 100%; height: 120px' type='application/x-oleobject' ondblclick='loadres(event)' onmousemove='MouseMove(TChart" + Index + ",event)'"));
dvChart.Controls.Add(new LiteralControl("classid='clsid:BDEB0088-66F9-4A55-ABD2-0BF8DEEC1196' name='TChart' viewastext >"));
dvChart.Controls.Add(new LiteralControl("<param name='Base64' value='VFBGMAtUQ2hhcnRDaGFydAAETGVmdAIAA1RvcAIABVdpZHRoAy4CBkhlaWdodAMcARBHcmFkaWVu
dC5WaXNpYmxlCRJUaXRsZS5UZXh0LlN0cmluZ3MBBghUZWVDaGFydAAAAAAAAAACAAAAAP////8='"));
dvChart.Controls.Add(new LiteralControl(" codebase='Teechart8.cab#version=8,0,0,5'>"));
dvChart.Controls.Add(new LiteralControl("</object>"));
Could you please help me with your suggestions.
Thanks and regards
I am using TeeChart Activex Control objeect and create the charts dynamically on load time. I am already using the onmousemove event and its working fine. I am trying to use the ondblclick event in the same manner. But this event is not being fired.
Please refer the below code for reference:
dvChart.Controls.Add(new LiteralControl("<object id='TChart" + Index + "' style='width: 100%; height: 120px' type='application/x-oleobject' ondblclick='loadres(event)' onmousemove='MouseMove(TChart" + Index + ",event)'"));
dvChart.Controls.Add(new LiteralControl("classid='clsid:BDEB0088-66F9-4A55-ABD2-0BF8DEEC1196' name='TChart' viewastext >"));
dvChart.Controls.Add(new LiteralControl("<param name='Base64' value='VFBGMAtUQ2hhcnRDaGFydAAETGVmdAIAA1RvcAIABVdpZHRoAy4CBkhlaWdodAMcARBHcmFkaWVu
dC5WaXNpYmxlCRJUaXRsZS5UZXh0LlN0cmluZ3MBBghUZWVDaGFydAAAAAAAAAACAAAAAP////8='"));
dvChart.Controls.Add(new LiteralControl(" codebase='Teechart8.cab#version=8,0,0,5'>"));
dvChart.Controls.Add(new LiteralControl("</object>"));
Could you please help me with your suggestions.
Thanks and regards
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ashutosh,
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
As you will find below, I have used a chart object as:
<object> id='TChart" + Index + "' style='width: 100%; height: 120px' type='application/x-oleobject' ondblclick='loadres(event)' onmousemove='MouseMove(TChart" + Index + ",event)
"classid='clsid:BDEB0088-66F9-4A55-ABD2-0BF8DEEC1196' name='TChart' viewastext >"));
dvChart.Controls.Add(new LiteralControl("<param name='Base64' value='VFBGMAtUQ2hhcnRDaGFydAAETGVmdAIAA1RvcAIABVdpZHRoAy4CBkhlaWdodAMcARBHcmFkaWVu dC5WaXNpYmxlCRJUaXRsZS5UZXh0LlN0cmluZ3MBBghUZWVDaGFydAAAAAAAAAACAAAAAP////8='")); codebase='Teechart8.cab#version=8,0,0,5'";
</object>
I just want to fire an event on the DoubleClick on the Chart object. Is there any settings i need to make or it is just as the onmouseover event as this is working fine here.
Please suggest the needful.
Thanks and regards
Ashutosh
As you will find below, I have used a chart object as:
<object> id='TChart" + Index + "' style='width: 100%; height: 120px' type='application/x-oleobject' ondblclick='loadres(event)' onmousemove='MouseMove(TChart" + Index + ",event)
"classid='clsid:BDEB0088-66F9-4A55-ABD2-0BF8DEEC1196' name='TChart' viewastext >"));
dvChart.Controls.Add(new LiteralControl("<param name='Base64' value='VFBGMAtUQ2hhcnRDaGFydAAETGVmdAIAA1RvcAIABVdpZHRoAy4CBkhlaWdodAMcARBHcmFkaWVu dC5WaXNpYmxlCRJUaXRsZS5UZXh0LlN0cmluZ3MBBghUZWVDaGFydAAAAAAAAAACAAAAAP////8='")); codebase='Teechart8.cab#version=8,0,0,5'";
</object>
I just want to fire an event on the DoubleClick on the Chart object. Is there any settings i need to make or it is just as the onmouseover event as this is working fine here.
Please suggest the needful.
Thanks and regards
Ashutosh
Hi Narcis,
I wish to explain the problem in more details. I have used the TeeChart Activex control object in my web application. There I have an java script function for onmouseover evnt on the chart and there is a java script function for ondblclick event on chart object as shown in the code posted last. My problem is onmoseover works fine for the chart object but ondblclick event is not fired in the mouse double click.
Please suggest how can I capture the ondblclick event for the chart object to execute the java script function for the same.
Thanks and regards
Ashutosh Prasad
I wish to explain the problem in more details. I have used the TeeChart Activex control object in my web application. There I have an java script function for onmouseover evnt on the chart and there is a java script function for ondblclick event on chart object as shown in the code posted last. My problem is onmoseover works fine for the chart object but ondblclick event is not fired in the mouse double click.
Please suggest how can I capture the ondblclick event for the chart object to execute the java script function for the same.
Thanks and regards
Ashutosh Prasad
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ashutosh,
We splitted the last message you posted into a new thread here as it was not about the same subject discussed here. The new thread is here:
http://www.teechart.net/support/viewtopic.php?t=9218
Regarding the problem discussed in this thread, we are investigating it and will get back to you as soon as we have further news.
We splitted the last message you posted into a new thread here as it was not about the same subject discussed here. The new thread is here:
http://www.teechart.net/support/viewtopic.php?t=9218
Regarding the problem discussed in this thread, we are investigating it and will get back to you as soon as we have further news.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Ashutosh,
Here there's an example of how you could use OnMouseMove and OnDoubleClick events in a chart created dynamically:
Here there's an example of how you could use OnMouseMove and OnDoubleClick events in a chart created dynamically:
Code: Select all
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function DisplayChart()
{
Chart1.AddSeries(0);
Chart1.Series(0).FillSampleValues(10);
}
function Chart1_OnDblClick()
{
Chart1.ShowEditor();
}
function Chart1_OnMouseMove(Shift, X, Y)
{
Chart1.Header.Text.Item(0)="X: " + X + " Y: " + Y;
}
</SCRIPT>
</head>
<body onLoad = "DisplayChart()">
<SCRIPT LANGUAGE="JavaScript" FOR="Chart1" EVENT="OnDblClick" >
Chart1_OnDblClick()
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" FOR="Chart1" EVENT="OnMouseMove(Shift, X, Y)" >
Chart1_OnMouseMove(Shift, X, Y)
</SCRIPT>
<OBJECT ID="Chart1" WIDTH="50%" HEIGHT="50%"
CLASSID="CLSID:FAB9B41C-87D6-474D-AB7E-F07D78F2422E"
</OBJECT>
</body>
</html>
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |