score:2
Accepted answer
The line
.chart(function(c) { console.log(c);return dc.lineChart(c).dashStyle([2,3]).interpolate('cardinal').evadeDomainFilter(true); })
provides the function that generates subcharts. The parameters to this function appear to be undocumented, but a quick look at the source reveals
var subChart = _charts[sub.key] || _chartFunction.call(_chart, _chart, chartGroup, sub.key, i);
that the function takes the following parameters:
- the composite chart
- the chart group where the composite chart is registered
- the key for the subchart
- the index for the subchart
It's that third argument that you want. It's the key returned by your seriesAccessor
, and you can use whatever method you want to set the dashStyle
based on that key.
Source: stackoverflow.com
Related Query
- How to plot different line patterns for different lines in DC.js series chart?
- How to properly assign separate colors to different lines and line series in D3 Dimple?
- How to create a multi-series line chart with series for each unique item in 1st column?
- How do you add multiple lines to a D3JS line chart where the depedent variable data sources start at different positions along the range?
- how to give different color for the lines in the Sankey plot to show different groups?
- NVD3 Cumulative Line Chart : How to set different back ground color for specific X axis
- How do I set a different range for line chart embedded in a bar chart using d3.js
- d3js - How to plot a multi line chart chart for multiple groups of items that can be updated?
- In d3js, how to plot line chart from csv file, taking data from seperate columns for each row
- How to make curved lines to straight lines for Hierarchy Chart using d3.js
- How to plot animated line chart using d3 while the data table is required to be updated every 1 second?
- D3: How to use exit().remove() for Multi-Series Line Chart
- How to use series.stack = false in dimple.js to suppress aggregation; different symbols for each series
- How to create one line plot per color series in Observable Plot?
- How do I split labels for my donut chart to multiple lines using d3.js?
- d3.js Chart - QQ Plot - different colors for each part of the chart
- how to display data from 1st point on words on y axis for line chart in d3.js
- How to plot multiple lines one for each element of an array contains y values in vega spec data?
- C3 - line chart time series error: x is not defined for id = "Dates"
- how i can put more lines in Line Plus Bar Chart using nvd3.js?
- How to toggle lines in a line chart using a legend
- How to add labels for regions in c3.js line chart or detail chart?
- plot dots on multiple lines in line chart
- How to normalize data in d3 and plot the lines in the axis independent of other line ranges
- How do I plot data on different x-axes and scales with d3.js? And keep it linked for brushes/tooltips?
- How to show different titles for different chart in D3js?
- Adding transition to different lines in a line chart d3
- How do i plot multiple lines in the same line graph using the D3 framework?
- Assign different colours to vertical lines in a line chart based on property value
- How to create a line chart with vertical line and different backgrounds?
More Query from same tag
- NVD3: labels for second y-axis in MultiChart?
- Add text / label to each point / circle in nvd3 scatter plot?
- D3 JS Arch with Circle at border
- Bar charts in Haskell-d3js
- Newbie A-frame : a-box elements are centred on the x-axis
- D3.js - Line Graph: Area path goes over x and y axis on zoom
- Does D3 support multiple brushes on the same line chart?
- Label not center grouped bar chart lest than 5
- Call JavaScript function from SVG file
- d3.js - updating data in choropleth based on new .csv?
- d3.json response inside wrong callback variable
- Change bar dimension on mouseover event d3 js
- Create D3 Tree from JSON using ScalaJS
- Calculate area of polygon in d3
- nvd3 line chart - set the color of the line by Y value
- Turn a JSON array of arrays into <ul> and <li> elements
- Varying the gaps between specific bars in a D3 bar chart
- What is the default width and height of a group element in html (if it has any)?
- Prevent click event during animation
- D3.js Mouseover text inside donut chart
- javascript d3 create datasets from one set of data
- Moving appended path in a div (d3.js)
- Dynamically update directive data
- Issue labeling d3 sunburst
- constant index passed to event handler in d3.js
- d3.js - Force Layout and Node Positions
- Padding and margin on pack layout
- Firefox not downloading correct file to machine
- Can one specify a custom force function for a force-directed layout?
- D3.js hexbin hexagonal color picker