jqplot转换为图像不显示y轴html

时间:2016-06-08 12:41:04

标签: javascript php html jqplot

我在y轴刻度中添加了html,它在浏览器窗口中打印正常。

Browser window show it like this

但是,当我使用$('#chart')。jqplotToImageStr({})将图形转换为图像时,它会删除刻度线的html部分。

image using jqplotToImageStr({})

我尝试过什么?

我尝试通过jqplot转义HTML,并使用html_entity_decode在PHP中解码滴答,但没有运气。

期望的结果

我希望转换后的图片包含图片中打印的刻度线的HTML部分(绿色,黄色,红色框)。

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

以防万一有人在寻找答案。

将以下行添加到第9201行的核心jqplot lib。

if ($(el).css('background-color') && $(el).css('width') && $(el).css('height')){
   newContext.fillStyle = $(el).css('background-color');
   newContext.fillRect(left, top, $(el).css('width'), $(el).css('height'));
}