# Path: washmap/washmap/chart_constants.py
# PLOT_FORMATS = dict(
#     toolbar_location=None,
#     outline_line_color="#FFFFFF",
#     title_text_font=FONT,
#     title_text_align='left',
#     title_text_color=BLUE,
#     title_text_baseline='top',
# )
# 
# ORANGE = "#FFA500"
# 
# BLUE = WATER_COLOR_RANGE[5]
# 
# DARK_GRAY = "#6B6B73"
# 
# AXIS_FORMATS = dict(
#     minor_tick_in=None,
#     minor_tick_out=None,
#     major_tick_in=None,
#     major_label_text_font=FONT,
#     major_label_text_font_size="10pt",
#     major_label_text_font_style="bold",
#     axis_label_text_font=FONT,
#     axis_label_text_font_size="10pt",
# 
#     axis_line_color=GRAY,
#     major_tick_line_color=GRAY,
#     major_label_text_color=DARK_GRAY,
# 
#     major_tick_line_cap="round",
#     axis_line_cap="round",
#     axis_line_width=3,
#     major_tick_line_width=3,
# )
# 
# ORANGE_SHADOW = "#D48702"
# 
# FONT_PROPS_SM = dict(
#     text_color=DARK_GRAY,
#     text_font=FONT,
#     text_font_style="normal",
#     text_font_size='10pt',
# )
# 
# FONT_PROPS_MD = dict(
#     text_color=DARK_GRAY,
#     text_font=FONT,
#     text_font_style="normal",
#     text_font_size='18pt',
# )
# 
# FONT_PROPS_LG = dict(
#     text_font=FONT,
#     text_font_style="bold",
#     text_font_size='23pt',
# )
# 
# GREEN = "#43C4AD"


from bokeh.models import (
    ColumnDataSource,
    HoverTool,
    Line,
    LinearAxis,
    Patches,
    Plot,
    Range1d,
    Rect,
    SingleIntervalTicker,
    TapTool,
    Text,
    Triangle,
)
from bokeh.plotting import vplot, hplot
from .chart_constants import (
    PLOT_FORMATS, ORANGE, BLUE, DARK_GRAY, AXIS_FORMATS, ORANGE_SHADOW,
    FONT_PROPS_SM, FONT_PROPS_MD, FONT_PROPS_LG, GREEN
)
    plot.add_glyph(rect)
    box = Rect(x=200, y=100, width=100, height=40, fill_color=ORANGE, line_color=None)  # nopep8
    plot.add_glyph(box)
    year = Text(x=160, y=85, text='year', text_font_size='18pt', text_color="#FFFFF", text_font_style="bold")  # nopep8
    plot.add_glyph(source, Text(), selection_glyph=year)

    return plot


def construct_water_text(source):
    plot = construct_text_box(source, 'wat_value', 'wat_color', BLUE)
    return plot


def construct_san_text(source):
    plot = construct_text_box(source, 'san_value', 'san_color', GREEN)
    return plot


def construct_line(source, value_string, line_color=BLUE):
    xdr = Range1d(1990, 2013)
    ydr = Range1d(0, 100)
    line_plot = Plot(
        x_range=xdr,
        y_range=ydr,
        title="",
        plot_width=250,
        plot_height=150,
        min_border_top=10,
        min_border_left=50,

# Path: washmap/washmap/chart_constants.py
# PLOT_FORMATS = dict(
#     toolbar_location=None,
#     outline_line_color="#FFFFFF",
#     title_text_font=FONT,
#     title_text_align='left',
#     title_text_color=BLUE,
#     title_text_baseline='top',
# )
# 
# ORANGE = "#FFA500"
# 
# BLUE = WATER_COLOR_RANGE[5]
# 
# DARK_GRAY = "#6B6B73"
# 
# AXIS_FORMATS = dict(
#     minor_tick_in=None,
#     minor_tick_out=None,
#     major_tick_in=None,
#     major_label_text_font=FONT,
#     major_label_text_font_size="10pt",
#     major_label_text_font_style="bold",
#     axis_label_text_font=FONT,
#     axis_label_text_font_size="10pt",
# 
#     axis_line_color=GRAY,
#     major_tick_line_color=GRAY,
#     major_label_text_color=DARK_GRAY,
# 
#     major_tick_line_cap="round",
#     axis_line_cap="round",
#     axis_line_width=3,
#     major_tick_line_width=3,
# )
# 
# ORANGE_SHADOW = "#D48702"
# 
# FONT_PROPS_SM = dict(
#     text_color=DARK_GRAY,
#     text_font=FONT,
#     text_font_style="normal",
#     text_font_size='10pt',
# )
# 
# FONT_PROPS_MD = dict(
#     text_color=DARK_GRAY,
#     text_font=FONT,
#     text_font_style="normal",
#     text_font_size='18pt',
# )
# 
# FONT_PROPS_LG = dict(
#     text_font=FONT,
#     text_font_style="bold",
#     text_font_size='23pt',
# )
# 
# GREEN = "#43C4AD"


# Path: washmap/washmap/water_map.py
from bokeh.models import (
    ColumnDataSource,
    HoverTool,
    Line,
    LinearAxis,
    Patches,
    Plot,
    Range1d,
    Rect,
    SingleIntervalTicker,
    TapTool,
    Text,
    Triangle,
)
from bokeh.plotting import vplot, hplot
from .chart_constants import (
    PLOT_FORMATS, ORANGE, BLUE, DARK_GRAY, AXIS_FORMATS, ORANGE_SHADOW,
    FONT_PROPS_SM, FONT_PROPS_MD, FONT_PROPS_LG, GREEN
)

    plot.add_glyph(rect)
    box = Rect(x=200, y=100, width=100, height=40, fill_color=ORANGE, line_color=None)  # nopep8
    plot.add_glyph(box)
    year = Text(x=160, y=85, text='year', text_font_size='18pt', text_color="#FFFFF", text_font_style="bold")  # nopep8
    plot.add_glyph(source, Text(), selection_glyph=year)

    return plot


def construct_water_text(source):
    plot = construct_text_box(source, 'wat_value', 'wat_color', BLUE)
    return plot


def construct_san_text(source):
    plot = construct_text_box(source, 'san_value', 'san_color', GREEN)
    return plot


def construct_line(source, value_string, line_color=BLUE):
    xdr = Range1d(1990, 2013)
    ydr = Range1d(0, 100)
    line_plot = Plot(
        x_range=xdr,
        y_range=ydr,
        title="",
        plot_width=250,
        plot_height=150,
        min_border_top=10,
        min_border_left=50,

        **PLOT_FORMATS