Question regarding src=dygraph.css versus href=dygraph.css

46 views
Skip to first unread message

curtii

unread,
May 24, 2017, 10:41:59 PM5/24/17
to dygraphs-users

Brand new to Dygraphs, and I just have to say, this software is GREAT! It's exactly what I had been searching for, so a big thank you to everyone who builds/maintains it.


I built a simple page using Dygraphs that plots the temperature/humidity readings of three sensors in my server rack.

My first question is likely due to very little web development experience on my part. When I first started putting this together, I was having fits because the label for my Y-axis wasn't displaying properly - It was either entirely off the page, or it was horizontal and half off the page, like this:

After tearing my hair out for a while, I finally figured out it's due to using src= instead of href= for linking CSS, like so:

<link rel="stylesheet" src="dygraph.css"> as opposed to <link rel="stylesheet" href="dygraph.css">. After fixing that, my simple webpage now looks like this:

The Y-axis label looks like it should, but there's one issue I have now and I'm wondering if I can fix it - I really preferred the way the legend looks when using src= instead of href= (as in the first screenshot). Is there a way for me to modify my site so that everything is like the second page (I'm guessing that href is the "correct" way to do this), but keep my legends looking like they were when I used src=?



Thanks very much in advance for any insight into this!

Dan Vanderkam

unread,
May 25, 2017, 10:30:54 PM5/25/17
to dygraph...@googlegroups.com
src= doesn't load the CSS at all. You can modify the CSS file to get whatever effect you like. Try figuring out what the relevant rule is.

--
You received this message because you are subscribed to the Google Groups "dygraphs-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean-Yves Garneau

unread,
Jul 30, 2020, 11:49:02 AM7/30/20
to dygraphs-users
After tearing my hair out for a while too, thank you for posting this, now works well with href.
Reply all
Reply to author
Forward
0 new messages