Jump to content
Software FX Community

No map or tooltips when using RenderToStream()


bngray
 Share

Recommended Posts

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()?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

post-3197-13922403146831_thumb.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...