How do I color the dots of a line-chart?

2
Hi,  I am styling a line-chart and want to give the dots a different color than the line.   When I inspect the page, the dots have inline styling and I can’t overwrite this.   A line-chart can be styled by json as well but I can’t find what code I have to type to change the colors of the dots.    How can I change the color of the dots of the line chart whitout changing the color of the line?   Thanks, Kolien
asked
2 answers
1

Kolien,

I think this is what you are looking for:

[ {
  "x": [ "giraffes", "orangutans", "monkeys" ],
  "y": [ 25.1, 12.2, 20.3 ],
  "type": "bar",
  "orientation": "v",
  "connectgaps": true,
  "hoveron": "points",
  "line": {
    "color": "blue",
    "shape": "linear"
  },
  "mode": "lines+markers",
  "fill": "none",
  "name": "Wild",
  "text":  ["25","12","20"],
  "textposition" : "auto",
  "hoverinfo": "none",
  "marker": {
    "color": "Blue"
  }
}

When you create each series, you specify line color with the line element and marker color with the marker element.

Hope that helps,

Mike

answered
2

For everyone that is looking for the solution: In the toggle editor you can change at the top the dropdown from "Layout" to the name of your series name. Here you can add: 
{
  "marker": {
    "color": "#ff0000"
  }

to change the color of the dots.For everyone that is looking for the solution: In the toggle editor you can change at the top the dropdown from "Layout" to the name of your series name. Here you can add: 
{
  "marker": {
    "color": "#ff0000"
  }

to change the color of the dots.

answered