Repository: bokeh/bokeh

Issue:
[BUG] Can't select bar_line_color in ColorBar
In Bokeh 2.1 trying to set attribute bar_line_color in the ColorBar class fails (it worked on Bokeh up to 2.0.2). Code as follows (same as User Guide -> Adding Annotations -> Colorbars with addition of setting bar_line_color)...

```
import numpy as np

from bokeh.models import ColorBar, LogColorMapper, LogTicker
from bokeh.plotting import figure, output_file, show

output_file('color_bar.html')

def normal2d(X, Y, sigx=1.0, sigy=1.0, mux=0.0, muy=0.0):
    z = (X-mux)**2 / sigx**2 + (Y-muy)**2 / sigy**2
    return np.exp(-z/2) / (2 * np.pi * sigx * sigy)

X, Y = np.mgrid[-3:3:100j, -2:2:100j]
Z = normal2d(X, Y, 0.1, 0.2, 1.0, 1.0) + 0.1*normal2d(X, Y, 1.0, 1.0)
image = Z * 1e6

color_mapper = LogColorMapper(palette="Viridis256", low=1, high=1e7)

plot = figure(x_range=(0,1), y_range=(0,1), toolbar_location=None)
plot.image(image=[image], color_mapper=color_mapper,
           dh=[1.0], dw=[1.0], x=[0], y=[0])

color_bar = ColorBar(color_mapper=color_mapper, ticker=LogTicker(),
                     label_standoff=12, border_line_color=None, location=(0,0),
                     bar_line_color='black')

plot.add_layout(color_bar, 'right')

show(plot)
```

The browser console gives the following error:
```
Uncaught (in promise) Error: ColorBar.bar_line_color given invalid value: {"value":"black"}
    at validate (bokeh-2.1.0.min.js:183)
    at v._update (bokeh-2.1.0.min.js:183)
    at new p (bokeh-2.1.0.min.js:183)
    at new v (bokeh-2.1.0.min.js:183)
    at new y (bokeh-2.1.0.min.js:175)
    at new l (bokeh-2.1.0.min.js:239)
    at new a (bokeh-2.1.0.min.js:233)
    at new l (bokeh-2.1.0.min.js:199)
    at new v (bokeh-2.1.0.min.js:276)
    at Function._instantiate_object (bokeh-2.1.0.min.js:162)
```

System:
Python 3.7.5
Bokeh 2.1.0
Chromium 81.0.4044.138
Ubuntu Mate 16.04

The same error occurred on Firefox on Ubuntu and on Chrome on Windows 10.



Discussion:

Resolving patch:
diff --git a/bokeh/models/annotations.py b/bokeh/models/annotations.py
--- a/bokeh/models/annotations.py
+++ b/bokeh/models/annotations.py
@@ -463,7 +463,7 @@ class ColorBar(Annotation):
     main plot area.
     """)
 
-    bar_props = Include(LineProps, help="""
+    bar_props = Include(ScalarLineProps, help="""
     The %s for the color scale bar outline.
     """)
 


Test patch:
diff --git a/bokehjs/test/unit/core/visuals.ts b/bokehjs/test/unit/core/visuals.ts
--- a/bokehjs/test/unit/core/visuals.ts
+++ b/bokehjs/test/unit/core/visuals.ts
@@ -18,7 +18,7 @@ describe("Fill", () => {
       it(`should set canvas context ${attr} value from ${spec} spec value`, () =>{
         const ctx = {} as any
         const attrs = {} as any
-        attrs[spec] = {value}
+        attrs[spec] = value
         const model = new Circle(attrs)
         const fill = new Fill(model)
         fill.set_value(ctx)
@@ -69,7 +69,7 @@ describe("Line", () => {
         ctx.setLineDash = function(x: number) { ctx.lineDash = x }
         ctx.setLineDashOffset = function(x: number) { ctx.lineDashOffset = x }
         const attrs = {line_dash: [1, 2]} as any
-        attrs[spec] = {value}
+        attrs[spec] = value
         const model = new Circle(attrs)
         const line = new Line(model)
         line.set_value(ctx)
@@ -120,7 +120,7 @@ describe("Text", () => {
       it(`should set canvas context ${attr} value from ${spec} spec value`, () =>{
         const ctx = {} as any
         const attrs = {text_font: 'times', text_font_size: "16px", text_font_style: "bold"} as any
-        attrs[spec] = {value}
+        attrs[spec] = value
         const model = new text_glyph.Text(attrs)
         const text = new Text(model)
         text.set_value(ctx)