user982
user982

Reputation: 189

How to change color of line in line chart using dimple.js?

This may have been asked before but I can't find the right solution. I want to change the default color of my line chart, e.g. 'Blue' color for the whole line, all values. Please advise.

Upvotes: 2

Views: 3231

Answers (3)

Plemo
Plemo

Reputation: 51

I was just looking for the same thing and found a maybe better solution. The best way would probably be dimple.chart.defaultColors (look here). Just for future lookups...

Upvotes: 0

John Kiernander
John Kiernander

Reputation: 4904

You can use the assignColor method of the chart object.

http://jsbin.com/vecoq/8/edit?js,output

Upvotes: 1

Osman Mazinov
Osman Mazinov

Reputation: 1446

You can use addColorAxis method:

myChart.addColorAxis("c", "blue");

Complete example is here.

Upvotes: 4

Related Questions