显示自定义标签 [英] To show custom labels

查看:78
本文介绍了显示自定义标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在使用非常小的图表,即图表区域的宽度和高度分别为100像素和25像素.
在这种情况下,我正在使用单个系列.但是,我想在其中显示自定义标签.那我该怎么做呢? -up.

我不确定您要使用的是什么(WinForms,ASP.NET,Silverlight等),但是在100x25的分辨率下(已绘制一系列图表),您没有足够的文本空间.

如果您自己生成文本并希望将其显示在图像上,则需要使用Graphics对象(使用DrawString方法)在文本上进行绘制.

干杯.


要获得一个美观,可样式化的工具提示,您可以生成服务器端并显示在客户端上,您需要编写一些脚本.您还需要生成图像映射.

此处查看示例[a] [ 解决方案

Use a pop-up.

I''m not sure what you''re working in (WinForms, ASP.NET, Silverlight, etc) but at 100x25, with a series already charted, you''ll not have much room for text.

If you''re generating the text yourself and do wish to have it on the image, you''ll need to paint it on yourself using the Graphics object (using the DrawString method).

Cheers.


For a good looking, stylable tooltip that you can generate server-side and display on the client you''ll need to write a bit of script. You''ll also need to generate the image map.

Have a look at the sample
here[^] at the bottom of the page. You can view the page source to see how it was created. This is a jQuery plugin, so you''ll need to grab jQuery and the bassistance plugin from the above demo.

Cheers.


这篇关于显示自定义标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆