c3 x-axis text is very large on chrome - c3.js

We used C3 charts in one of our projects, but after I upgraded chrome to latest version I got an issue, the chart renders very large text size for x-axis and once I resized the browser it renders correctly.
Any help please.
Chart Image

Finally, I found the reason for this unexpected behaver I just removed below attribute from the parent then everything works probably
data-uk-grid="{gutter: 20}"

Related

`.tickFormat(d3.format("s"))` error: y-axis tick labels don't display

I was trying Curran's splitting charts examples and noticed that all charts starting from the 4th one don't display y-axis tick texts.
I have updated my chrome to the latest version(Version 51.0.2704.106 (64-bit)). but still could not see the y-axis tick texts as the following picture demonstrated:
I think it was due to .tickFormat(d3.format("s")) as when comment out this line of code, we can see y-axis tick texts.
Was this error due to my Chrome browser? or something is changed in the version of d3.js or something else?
Could anyone give me some idea on how to solve it?
Thanks.

Why is Firefox displaying svg images wrong?

I encountered a weird Firefox's behaviour. It renders SVG images cutting parts of them or not displaying them at all, but only certain of images, not all of them. Chrome and IE are displaying them properly. Here is a link to the website I put said images on:
funjo.pl
Images which are not being displayed properly are logo in top menu bar and big blue logo with transparency on the big very top banner. The funny thing is that two icons a bit down on the same page (three rolls and woman's legs), which are also SVGs are being displayed properly. Could someone please tell me what's going on? I suppose there is something wrong with SVG image code itself but I can't detect what exactly.
I'm not pasting whole images' code beacuse it's too much of it. You can download these images from http://funjo.pl/media/2016/06/logo.svg and http://funjo.pl/media/2016/06/logo2.svg.
PS: If you really want me very badly to paste the whole code let me know.
PS2: I created all of SVGs on the website using Corel X7, if this information helps in anything.
PS3: I'm using the newest FF v 46.0.1.
Actually I've found a solution myself, it helped perfectly but required few more steps after exporting SVG in Corel X7 (as I mentioned in my post above there were two images, one of them with transparency). So here are the steps I made to make it being displayed properly in FF (a bit trial and error procedure but works):
I exported both SVGs again removing transparency from the one which was originally transparent, so no transparency at all in both SVG images. The one used as logo in menu bar contained all the elements grouped (logo and text were both separate but grouped), I ungrouped those elements and made them as one.
I removed height and width attributes from both SVGs.
I added preserveAspectRatio="none" attribute so I could manage width and height of the image separately, just like raster images (this CSS Tricks article helps a lot with understanting the whole resizing process).
I used SVG Optimiser tool to remove all the unnecessary bits from my images and to slim them down a little.
I downloaded optimised SVGs from above mentioned tool's website, uploaded them to my website's FTP.
I added height:(some)px and width:auto attributes in CSS
I added transparency for the one which was supposed to be transparent via CSS - opacity:0.7 in this case.
Refreshed the website and voilĂ , it works like a charm. Hope it will help someone with the similar problem as mine.
EDIT
Here are images to compare, working one and not working one.
PS: After some more trials and errors I found out that changing standard text to curves in Corel X7 makes FF render the SVG image properly without above steps, but it doesn't change the fact that it worked properly in Chrome and IE anyway even if the text wasn't changed to curves before export. Plus FF didn't display SVG exported with transparency at all and Chrome and IE did.
You could open a working and failing SVG file into your text editor and find differences in the generated HTML.
I guess there is a difference the way you save it or how the vectors and layers are put. Maybe some transparent layer on top off the image renders strange?
Applying a width of 300px or above gave me the correct results as in chrome and IE.
So just give a width as below and probably you can adjust the width as per your requirement.
Hope it helps.
<img style="width: 300px;" src="http://funjo.pl/media/2016/06/logo.svg" alt="Funjo">
I solved it by removing commas , by spaces

SVG renders incorrectly in Firefox

I am working with SVG the first time and came across this problem:
I am using some SVGs for icons and everything works fine - except for one icon that renders incorrectly in Firefox on Windows. Firefox on OS X however renders it just fine.
Here is an anonymized version of the header I am placing SVG icons in:
http://files.uiux.de/140618_header/
That problem persists regardless if I use the Sprite utilized in the above example or if I use separate files for each icon.
Here are two screenshots of the render-issue I am experiencing. The problem is that little 'dent' on the lower end of that earphone:
We've saved those SVGs in Illustrator and used SVG 1.1 as export-setting.
Can someone point out what the problem seems to be here?
I'm not seeing that error in the sample header when I look at it with my version of FF (30).
It looks to me as if the artifact/'dent' you are seeing is caused by the left-most column of pixels of the envelope icon next to the phone in the sprite sheet. You can tell if you zoom up the image.
What I do, to make sure things like this don't happen, is to not put icons hard up next to each other in the spritesheet. Leave a few pixels gap between them.

How to have only one brush show on page load when using multiple charts in dc.js/d3.js

I've created a page using dc.js/d3.js with multiple bar charts and a row chart, and when I hover over them and interact, the brush functionality works as expected in all charts.
I'm trying to get just one of the charts to have the brush and a range appear on page load, but when I try this using .filter on one chart, the other charts become disabled. I have also experimented with .extent.
Image of the two version of the charts:
http://neil-s.com/unison/images/Brush3.png
I have looked at some related posts on SO, but they aren't quite what I need. The main crossfilter page has an example, but since the code is so different, I want to see if I can retain what I have, otherwise I'll use the crossfilter page code.
Updated:
Here is a jsfiddle - http://jsfiddle.net/jth32/22/
And here is a small sample of the bar chart code:
// Bar Chart 3-------------------------------
psalBarChart
.width(300).height(150)
.dimension(psalDim)
.group(psalGroup)
.x(d3.scale.linear()
.domain([25, 40]))
.xAxisLabel("Salinity")
.centerBar(true);
// Bar Chart 4 -----------------------------------
depthBarChart
.width(300).height(150)
.dimension(depthDim)
.group(depthGroup)
.x(d3.scale.linear()
.domain([0, 2050]))
.xAxisLabel("Depth")
.centerBar(true)
//.filter([0,1000]) // Creates Brush, but disables other charts
Thanks
I found out it had to do with the version of dc.js that I was using. The latest version on github (v2.0) is what I had, but the CDN link I used in jsfiddle used version 1.6.0, and that works fine as Ethan mentioned. Once I switched to 1.6.0 in my dev environment, that fixed my issue.
I posted a message to the dc-js google user group, and I'll add another message here if this is indeed a bug in dc.js v2.0.

Letters in label messed up of flot grapn

I am using flot to display a bar graph. Due to the long label of x-axis, I use a js plug-in which named jquery.flot.tickrotor.js.
The label looks fine on most computers. But on some computers, the letters in the label are kind of messed up and the font looks strange.
I really want to post the pic to show the display but I don't have enough reputation to do so.
Does anyone know what may cause this problem?
The labels are probably rotated using CSS transforms. Some browsers - mainly IE 7 & 8 - do a poor job of rendering the rotated labels.
If the plugin supports rendering text to canvas directly, enabling that should fix the problem. Otherwise there's nothing you can do about it. Since those browsers are disappearing from the market due to their age, the problem will eventually just disappear.

Resources