Welcome Guest Search | Active Topics | Sign In | Register

Text not rendering when converting NVD3.js chart Options
Lance
Posted: Tuesday, May 28, 2013 5:15:31 PM
Rank: Member
Groups: Member

Joined: 5/28/2013
Posts: 10
Hi,

I'm doing some quick tests for converting HTML documents containing NVD3.js charts and it currently omits all of the text elements in the chart. As an example, you can try converting the following URL:

http://nvd3.org/ghpages/line.html

The legend (orange/green circles) and X/Y axis text labels do not render.

Do you have any suggestions on why this might be happening and how I could fix it?

Thanks,

Lance
eo_support
Posted: Tuesday, May 28, 2013 5:50:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please try to add the following CSS block at the top of the page:

Code: HTML/ASPX
<style type="text/css">
	text
	{
		fill: #000000;
	}
</style>


The problem is caused by the fact that NVD3.js did not explicitly set the fill color for its text element. It seems that in our code the default fill color is transparent (which makes sense for shapes such as rectangle, but does not make sense to text). The above code explicitly set the text fill color as black. Once the text fill color is set, you should see all the text.

Hope this helps. Please feel free to let us know if you still have any questions. We will also look further to see if we can change the default fill color for text element.

Thanks!
Lance
Posted: Tuesday, May 28, 2013 5:55:54 PM
Rank: Member
Groups: Member

Joined: 5/28/2013
Posts: 10
Thanks, that fixed the issue. I appreciate the quick response!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.