bngray Posted November 12, 2007 Report Share Posted November 12, 2007 I noticed that when I put my chart in its own aspx so that I can take advantage of RenderToStream() (using an img tag with src = "MyChart.aspx" on the calling page) no tooltips or image maps are generated. Code like: MyChart.Points[x].Link.Url = "SomeURL" doesnt work. This makes sense since the page can only stream an image. Any way I can get tool tips, linkable areas, etc for this image while still using RenderToStream()? Quote Link to comment Share on other sites More sharing options...
Frank Posted November 12, 2007 Report Share Posted November 12, 2007 RenderToStream is overloaded. One of the overloads is: public void RenderToStream (Stream content,TextWriter imgMap,TextWriter htmlTag) In which you can get the Image map as well as the image itself. Image maps are necessary for Tooltips and Hyperlinks. Your page has to contain both, however you can not return both the image content and image map in the same request, you have to make two requests. It can get a little tricky but it is possible to do. What is the reason you are using RenderToStream. I ask because maybe there is a better way to do what you are doing without having these complications. Quote Link to comment Share on other sites More sharing options...
bngray Posted November 12, 2007 Author Report Share Posted November 12, 2007 Yeah, I just read the API (was lazy and didnt go there first) and noticed it explicitly states that when rendering directly to the client, you lose maps. I knew this as such, but thought there would be some method to get map text from the current state of the chart object. Anyway, I want to avoid writing to the server and creating huge amounts of temp files, but still need map tag functionality. In another application, with several gauges on one page, I named the image and map files so that they always overwrote the previous ones using the overloaded RenderToStream() method. Still, in order to get the map tags, I had to go to the server, get the map file, and do some client side processing. It was ugly. Using PSS is not an option since it has not been approved on the network. Any suggestions? Quote Link to comment Share on other sites More sharing options...
Frank Posted November 12, 2007 Report Share Posted November 12, 2007 PSS was designed precisely to solve this problem. It acts as a repository for your images so that they don't have to be stored in temporary files. Quote Link to comment Share on other sites More sharing options...
bngray Posted November 13, 2007 Author Report Share Posted November 13, 2007 Yes, this I know, and I would be more than happy to use PSS. However, in my last post I stated that PSS WAS NOT an option for me as I work on a secure network and PSS has yet to be, and may never be, approved. Therefore, I am asking for another method to accomplish my goals. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.