score:1
if you want to set your own colors based on series order:
var mycfg = {
color: function(i) {
c = ['red', 'yellow', 'pink', 'green', 'blue', 'olive', 'aqua', 'cadetblue', 'crimson'];
return c[i];
}
}
the first series will be red
, second yellow
, etc...
example here.
Source: stackoverflow.com
Related Query
- D3 Radar Chart Colors
- d3.js chart area filling with different colors
- Interactive spider or radar chart using d3
- dc.js line chart with range of colors
- Setting pie chart colors using d3.js
- 2 arrays one of values one of colors make D3 bar chart have color at same index of value
- D3.js bar chart colors not shown in print out but displayed on browser
- Gauge chart with steps of colors
- d3.js Chart - QQ Plot - different colors for each part of the chart
- D3 radar chart data update doesn't work
- Pie chart avoiding same adjacent color when rotating colors
- d3.js-adding different colors to one bar in stacked bar chart
- D3.js radar chart tooltip
- Rotating the text in the pie chart of d3.js and alternate filling of colors
- Changing the colors of each of the Stacked Bar chart with different Color in D3
- How to position circles/points at intersection on a Radar Chart in D3.js
- Fill line chart area with multiple colors
- Custom colors in C3.js timeseries chart
- D3.js Donut Chart change node colors and add text label to middle
- make axis of radar chart conditional to existence of value
- d3.js Color Groups for Radar Chart
- d3.js radar chart with images provided in data
- Creating a radar chart with d3 and multiple diagonal brushes
- render bar chart with different colors in react native
- Issue in generating the chart with required color, i.e. specified colors are not displayed
- d3 shrinking radar chart shape using attrTween
- Ho to set line colors on a nvd3 parallel Coordinates chart
- Updating Pie Chart with Specific colors not working as expected
- d3 radar chart -- radialLine creates path but without coordinates
- How to modify the scale of a radar chart from percent to numeric values
More Query from same tag
- Hide and show svg element with transition
- D3 Chart print issue
- A more elegant way to bind new elements using data bound to multiple group elements
- How can I limit the movement of elements in D3 Force?
- D3js "bars.enter().attr" is not a function
- How to use declared variables in html section?
- Line not following x os correctly & first tick isn't being shown
- D3.js - Making legend use descriptive strings for legend instead of data values
- Why is my tooltip flashing on and off?
- hide X and Y axes on charts with n3-line-chart
- Binding configuration to a function using a closure
- D3.js - Get all possible child elements for a node
- Unable to understand d3js zoom functionality
- Arc Tweening is snapping as opposed to animating
- Multi-series chart - time (year) interval x-axis overlaying multiple years of data
- how to get rid of overlap line graph in d3js
- d3.js v4 d3.layout.tree has been removed?
- Multiline chart d3 tooltip
- d3 react js - Failed to execute 'createElementNS' on 'Document': The qualified name provided contains the invalid character ','
- Crossfilter Row Chart Top 10
- D3 Chart breaks without top margin
- Adding a Background to certain part of a graphic with nvd3
- Is SVG-Based UI an available and / or viable option?
- Why Can I not Get D3 Force Directed Graph Link Labels to work
- Hide nodes on Mousedown in d3
- D3 accessing the update selection for nested datajoins
- Changing colour of bar on selecting and unselecting bar in composite chart
- d3.js: run the same code in Angular app and on node.js
- How to have an interactive D3 chart read a json file instead of csv data?
- What does Topojson example data mean?