Page 1 of 1
Dynamic WebCharts on same page
Posted: Fri Feb 10, 2006 10:17 pm
by 9639322
We have a need to be able to add WebChart Controls to page dynamically. We have query that returns some data. Based on that data we need to generate anywhere from 1 to 200 charts. I do no want to add 200 webchart controls through web designer manually. Is there a way to add them dynamically to web page and specifically to assign them to a certain cell within HtmlTable server control.
Posted: Mon Feb 13, 2006 11:38 am
by narcis
Hi vadimm,
To achieve what you request you need to use Response.Write to write the tag above to the client.
Code: Select all
<tchart:WebChart id="WebChart1" style="Z-INDEX: 104; LEFT: 56px; POSITION: absolute; TOP: 56px" runat="server"
Width="760px" Height="448px" TempChart="File" ClickedY="0" ClickedX="0" GetChartFile="GetChart.aspx"
AutoPostback="False" Config="AAEAAAD/////AQAAAAAAAAAMAgAAAAhUZWVDaGFydAwDAAAADlN5c3RlbS5EcmF3aW5nBQEAAAAVU3RlZW1hLlRlZUNoYXJ0LkNoYXJ0dgAAAAYuV2lkdGgVLlBhbmVsLlNoYWRvdy5WaXNpYmxlFS5XYWxscy5SaWdodC5BdXRvSGlkZRsuV2FsbHMuUmlnaHQuU2hhZG93LlZpc2libGUULldhbGxzLkJhY2suQXV0b0hpZGUaLldhbGxzLkJhY2suU2hhZG93LlZpc2libGUWLldhbGxzLkJvdHRvbS5BdXRvSGlkZRwuV2FsbHMuQm90dG9tLlNoYWRvdy5WaXNpYmxlFC5XYWxscy5MZWZ0LkF1dG9IaWRlGi5XYWxscy5MZWZ0LlNoYWRvdy5WaXNpYmxlFi5Gb290ZXIuU2hhZG93LlZpc2libGUbLkZvb3Rlci5Gb250LlNoYWRvdy5WaXNpYmxlFi5IZWFkZXIuU2hhZG93LlZpc2libGUbLkhlYWRlci5Gb250LlNoYWRvdy5WaXNpYmxlDS5IZWFkZXIuTGluZXMZLlN1YkhlYWRlci5TaGFkb3cuVmlzaWJsZR4uU3ViSGVhZGVyLkZvbnQuU2hhZG93LlZpc2libGUbLkxlZ2VuZC5Gb250LlNoYWRvdy5WaXNpYmxlHC5MZWdl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uVGVlQ2hhcnQuU3R5bGVzLlBvaW50ZXJTdHlsZXMBAAAAB3ZhbHVlX18ACAIAAAAAAAAAAAAAAAX3////JlN0ZWVtYS5UZWVDaGFydC5TdHlsZXMuQXJyb3dIZWFkU3R5bGVzAQAAAAd2YWx1ZV9fAAgCAAAAAAAAAAX2////FFN5c3RlbS5EcmF3aW5nLkNvbG9yBAAAAAV2YWx1ZQprbm93bkNvbG9yBXN0YXRlBG5hbWUAAAABCQcHAwAAAAAAAAAAAAAAIwABAAoIAAAAAfX////2////AACZ/wAAAAAAAAIACgYMAAAABnBvaW50MQHz////9v///wAAmf8AAAAAAAACAAoBAfL////2////AAAAAAAAAACNAAEACgHx////+P///wAAAAAJEAAAAAAAAAAGEQAAAAFZBhIAAAAdU3RlZW1hLlRlZUNoYXJ0LlN0eWxlcy5Qb2ludHMJEwAAAAAAAAAB7P////n///8BAAAAAAAAAAAAAev////4////AAAAAAAAAAAB6v////f///8AAAAAAen////2////AAAAAAAAAAAjAAEACggAAAAB6P////b///8ATQD/AAAAAAAAAgAKBhkAAAAGcG9pbnQyAeb////2////AE0A/wAAAAAAAAIACgEB5f////b///8AAAAAAAAAAE8AAQAKAeT////4////AAAAAAkdAAAAAAAAAAkRAAAA6AAAAGkAAAAB4f////b///8AAAAAAAAAADQAAQAKdgAAAAAAAAAAAAAAAAAAAAAABeD///8lU3lzdGVtLkRyYXdpbmcuVGV4dC5UZXh0UmVuZGVyaW5nSGludAEAAAAHdmFsdWVfXwAIAwAAAAAAAAAB3/////b///8AAAAAAAAAAKQAAQAKAQAF3v///yZTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuU21vb3RoaW5nTW9kZQEAAAAHdmFsdWVfXwAIAwAAAAEAAAAGIwAAAB5TdGVlbWEuVGVlQ2hhcnQuVG9vbHMuWm9vbVRvb2wB3P////b///8AAAAAAAAAAI0AAQAKBiUAAAAA8wEAAAYmAAAAHlN0ZWVtYS5UZWVDaGFydC5Ub29scy5ab29tVG9vbAHZ////9v///wAAAAAAAAAAjQABAAoJJQAAAPMBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEEAAAAAQAAAAYpAAAACFRlZUNoYXJ0DwYAAAAAAAAABg8QAAAAAAAAAAYPEwAAAAAAAAAGDx0AAAAAAAAABgs="></tchart:WebChart>
Posted: Wed Mar 08, 2006 10:44 pm
by 8120653
I am wanting to do the same thing for my office. I tried copying and pasting the code mentioned, but that does not work. Is there more code besides what was written that is assumed that I may be missing? I want to have a page that will display x number of graphs based off of x number of records returned. Any help would be appreciated.
Thanks,
Scott
Posted: Mon Mar 13, 2006 11:55 am
by narcis
Hi Scott,
A WebChart and a WebControl use the same tecnique to be inserted at "run-time". However, with TeeChart, you can also export TeeChart to an image and place the image where you want.
Posted: Wed Jul 18, 2007 8:07 am
by 9638303
Dear Sir
If using chart.export to image and use image.ImageURL to load the images method sound great ideas. but it is possible to fire javascript when the chart series has been click?
example using below the code to insert the onclick javascript event?
Private Sub GetHTMLMap(...)
e.PointPolygon.Attributes = "onclick=alert('dd');"
End Sub
thank
Yong