How to make a unique line thinner using NVD3
Tags: javascript,css,css3,d3.js,nvd3.js
Problem :
Good day. I have a Line Chart from NVD3 where there's 4 lines on the chart. I have it populating just fine. However, I would like one of those lines to be thinner than the rest.
When I go to the nvd3.CSS; the group class represents for all the lines so when I change the stoke-width; it does it for all. When I inspected the elements, it shows that each line does have a unique 'series class' but I can't seem to call it right to make the change for a single line. I would like the series-2 in the group to have the thinner stroke-wdith. Any sugguestion?
How do you make a single line thin with respect to its series while making the others the standard group 'stroke-width'?
.nvd3 g.nv-groups path.nv-line { // the group lines that apply to all
stroke-width: 9px;
}
.nvd3 g.nv-groups path.nv-series-2{ // the single line i am trying to make thinner
stroke-width: 1px;
}
Solution :
If you want to walk the entire selection tree, it would be:
.nvd3 g.nv-groups g path.nv-line {
stroke-width: 9px;
}
.nvd3 g.nv-groups g.nv-series-2 path.nv-line {
stroke-width: 1px;
}
CSS Howto..
Using an absolute positioned wrapper, we can use an img tag to add in the image, then use a span to contain the overlaid text, like this: <div id="wrapper"> <img...
jQuery.css('key',num) just accepts a number. So you can just do this: var footerheight = -$("footer").height(); ...
An HTML page is parsed the order it is built. if the CSS is parsed already, the elements that have styles in that parsed CSS will get styled immediately when...
I'll try to explain the Bootstrap grid structure which I think will help you understand the problem. .col-xx-yy col = column selector xx (xs, sm, md, lg) = screen width...
With your HTML and just this CSS, the three items will display together on one line: .center h1 {display: inline;} Working demo: http://jsfiddle.net/jfriend00/yK7Qy/ FYI, I notice that you're using the...
Close the button tag You've floated both the search bar and the button. The parent div won't use the height that the children occupy, until you insert a div...
Use nested class inside your css using ng-submitted /*Show red border if kept the input empty after touching*/ .ng-touched.ng-invalid-required { border-color: red; } /* Show red border when stuff has...
First and foremost, you should use the new CSS Flexible Box Module syntax (which is now referred to as "Flex" rather than "Box"). See the spec here: http://www.w3.org/TR/css3-flexbox/ Here is...
That br does not really make a difference there. What you need is not a line-break. You have to specify -webkit-box-orient: vertical;. It's default value is horizontal, that is why...
In this instance, when you set display:none on the img element, the a element collapses upon itself because the img element is the a element's only child. The background image...
You need to add event listeners on the buttons, and then when the button is clicked you save the result in a variable, something like this: var result; document.getElementById('seller').addEventListener('click', function()...
The best way to tackle this issue is instead of using px use em or % ( percentage ). .container { width: 1000 px; height: 750 px; } .container {...
Try this: .f1 { float:left; box-shadow: 1px 1px 2px #777; -moz-box-shadow: 1px 1px 2px #777; -webkit-shadow: 1px 1px 2px #777; position: relative; width: 280px; height: 380px; overflow: hidden; margin-right: 10px;...
You can use the immediate child selector, and change the border property's value to none: .UserControlStyle.ClassToOverrideBorders > .ClassWithBorders { border: none; } Using the 3 class names in this manner...
in tables.js add the following code: function init() { settings = tinyMCE.settings; settings["table_styles"] = "make stuff red=red;make stuff blue=blue;" + settings["table_styles"]; tinyMCE.settings["table_styles"] = settings["table_styles"]; ...
You can use JSTL functions fn:toLowerCase() to lowercase a string. So, this should do <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> ... <a href="..." style="text-transform: capitalize">${fn:toLowerCase(linkName)}</a> ...
FIrst there is no issue with the MySQL if you can access the page and it works. The issue is when you include it in another page. The issue that...
What you need is CSS's float property which kind of forces an element to be aligned either left or right. Updated fiddle: http://jsfiddle.net/BXSJe/820/ Hope this helped. :)...
You need to set every parent element to 100% height;
If you don’t want to use the resize property, there’s no other option to do this with CSS. However, you can achieve this with JavaScript. There are libraries that support...
This is how I would do it, using only CSS: /* Extra Small Devices (Below 767px) - 1 div per row */ @media (max-width: 767px) { .row > div {...
You will need to manage the same logic but don't slice your desgin in two rows, just one: <div class="container"> <div class="row"> <div class="col-md-8 col-lg-6 B"></div> <div class="col-md-4 col-lg-3 G"></div>...
put this in css file .pp { position:fixed; top: 30px; width: 944px; z-index:1; top:5px; } in body set the header to class pp <header class="pp"> <!-- Defining the header...
-webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.2); Fiddle Also transitions....
For all of the references above: Give them unique class names you can refer to in css. Give each image a defined height and width in your new css classes....
Solution The transition-delay function can only be parsed as the second timing value. Instead of this: transition: transform 2s, opacity .1s; Work with this: transition: transform 2s 0s, opacity 0s...
Without div: Demo: http://jsfiddle.net/GCu2D/790/ CSS: html, body { margin:0; padding:0; height:100%; width:100%; background-color:#f0f0f0 } ul { margin:0px; padding:0; position:relative; } ul:before { left: 0; right: 0; bottom: 0px; height: 0;...
Is not very clear what you are trying to do, but i understand that is something like transition: left 1s; or transition: transform 1s; and when you press your button...
CSS is a plain text format that needs to be read by a browser as CSS. There's nothing you can do to restrict access to it and still have it...
The problem is with the following CSS rule: .carousel img { position: absolute; width: 100%; height: auto; } This will affect both the main image and each thumbnail, resulting in...