
# -------------------------------------------------------------------------------
# Copyright IBM Corp. 2017
# 
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
# http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------------
from gateway.chartsManager import chart_storage
from nose.tools import assert_equals

def test_store_chart():
    print("List before tests")
    chart_storage.list_charts()
    print("=================")

    do_store_chart({
        "description":"mock description",
        'chart':"<div>Here comes some chart</div>"
    })

    do_store_chart({
        "description":"with bokeh",
        'chart':bokeh_rendering
    })

    print("List after tests")
    chart_storage.list_charts()
    print("=================")

def do_store_chart(payload):
    chart_model = chart_storage.store_chart(payload)
    #check that the chart_model is good
    fetched_model = chart_storage.get_chart(chart_model['CHARTID'])
    assert_equals(payload['chart'], fetched_model['CONTENT'])
    assert_equals( chart_storage.delete_chart(chart_model['CHARTID']), 1)

bokeh_rendering = """
<pre>{'description': None, 'chart': '\n                    <script class="pd_save">\n                    if ( !window.Bokeh && !window.autoload){\n                        window.autoload=true;\n                        \n(function(global) {\n  function now() {\n    return new Date();\n  }\n\n  var force = true;\n\n  if (typeof (window._bokeh_onload_callbacks) === "undefined" || force === true) {\n    window._bokeh_onload_callbacks = [];\n    window._bokeh_is_loading = undefined;\n  }\n\n\n  \n  if (typeof (window._bokeh_timeout) === "undefined" || force === true) {\n    window._bokeh_timeout = Date.now() + 5000;\n    window._bokeh_failed_load = false;\n  }\n\n  var NB_LOAD_WARNING = {\'data\': {\'text/html\':\n     "<div style=\'background-color: #fdd\'>\\n"+\n     "<p>\\n"+\n     "BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n"+\n     "may be due to a slow or bad network connection. Possible fixes:\\n"+\n     "</p>\\n"+\n     "<ul>\\n"+\n     "<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n"+\n     "<li>use INLINE resources instead, as so:</li>\\n"+\n     "</ul>\\n"+\n     "<code>\\n"+\n     "from bokeh.resources import INLINE\\n"+\n     "output_notebook(resources=INLINE)\\n"+\n     "</code>\\n"+\n     "</div>"}};\n\n  function display_loaded() {\n    if (window.Bokeh !== undefined) {\n      var el = document.getElementById("");\n      el.textContent = "BokehJS " + Bokeh.version + " successfully loaded.";\n    } else if (Date.now() < window._bokeh_timeout) {\n      setTimeout(display_loaded, 100)\n    }\n  }\n\n  function run_callbacks() {\n    try {\n      window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n    }\n    finally {\n      delete window._bokeh_onload_callbacks\n    }\n    console.info("Bokeh: all callbacks have finished");\n  }\n\n  function load_libs(js_urls, callback) {\n    window._bokeh_onload_callbacks.push(callback);\n    if (window._bokeh_is_loading > 0) {\n      console.log("Bokeh: BokehJS is being loaded, scheduling callback at", now());\n      return null;\n    }\n    if (js_urls == null || js_urls.length === 0) {\n      run_callbacks();\n      return null;\n    }\n    console.log("Bokeh: BokehJS not loaded, scheduling load and callback at", now());\n    window._bokeh_is_loading = js_urls.length;\n    for (var i = 0; i < js_urls.length; i++) {\n      var url = js_urls[i];\n      var s = document.createElement(\'script\');\n      s.src = url;\n      s.async = false;\n      s.onreadystatechange = s.onload = function() {\n        window._bokeh_is_loading--;\n        if (window._bokeh_is_loading === 0) {\n          console.log("Bokeh: all BokehJS libraries loaded");\n          run_callbacks()\n        }\n      };\n      s.onerror = function() {\n        console.warn("failed to load library " + url);\n      };\n      console.log("Bokeh: injecting script tag for BokehJS library: ", url);\n      document.getElementsByTagName("head")[0].appendChild(s);\n    }\n  };\n\n  var js_urls = ["https://cdn.pydata.org/bokeh/release/bokeh-0.12.6.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.6.min.js"];\n\n  var inline_js = [\n    function(Bokeh) {\n      Bokeh.set_log_level("info");\n    },\n    \n    function(Bokeh) {\n      \n    },\n    function(Bokeh) {\n      console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.6.min.css");\n      Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-0.12.6.min.css");\n      console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.6.min.css");\n      Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.6.min.css");\n    }\n  ];\n\n  function run_inline_js() {\n    \n    if ((window.Bokeh !== undefined) || (force === true)) {\n      for (var i = 0; i < inline_js.length; i++) {\n        inline_js[i](window.Bokeh);\n      }} else if (Date.now() < window._bokeh_timeout) {\n      setTimeout(run_inline_js, 100);\n    } else if (!window._bokeh_failed_load) {\n      console.log("Bokeh: BokehJS failed to load within specified timeout.");\n      window._bokeh_failed_load = true;\n    } else if (force !== true) {\n      var cell = $(document.getElementById("")).parents(\'.cell\').data().cell;\n      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n    }\n\n  }\n\n  if (window._bokeh_is_loading === 0) {\n    console.log("Bokeh: BokehJS loaded, going straight to plotting");\n    run_inline_js();\n  } else {\n    load_libs(js_urls, function() {\n      console.log("Bokeh: BokehJS plotting callback run at", now());\n      run_inline_js();\n    });\n  }\n}(this));  \n                    }\n                    </script>\n                    \n\n    <div class="bk-root">\n        <div class="bk-plotdiv" id="821dab70-4483-4e0e-bf8e-5968004b9021"></div>\n    </div>\n<script type="text/javascript">\n  \n  (function(global) {\n    function now() {\n      return new Date();\n    }\n  \n    var force = false;\n  \n    if (typeof (window._bokeh_onload_callbacks) === "undefined" || force === true) {\n      window._bokeh_onload_callbacks = [];\n      window._bokeh_is_loading = undefined;\n    }\n  \n  \n    \n    if (typeof (window._bokeh_timeout) === "undefined" || force === true) {\n      window._bokeh_timeout = Date.now() + 0;\n      window._bokeh_failed_load = false;\n    }\n  \n    var NB_LOAD_WARNING = {\'data\': {\'text/html\':\n       "<div style=\'background-color: #fdd\'>\\n"+\n       "<p>\\n"+\n       "BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n"+\n       "may be due to a slow or bad network connection. Possible fixes:\\n"+\n       "</p>\\n"+\n       "<ul>\\n"+\n       "<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n"+\n       "<li>use INLINE resources instead, as so:</li>\\n"+\n       "</ul>\\n"+\n       "<code>\\n"+\n       "from bokeh.resources import INLINE\\n"+\n       "output_notebook(resources=INLINE)\\n"+\n       "</code>\\n"+\n       "</div>"}};\n  \n    function display_loaded() {\n      if (window.Bokeh !== undefined) {\n        var el = document.getElementById("821dab70-4483-4e0e-bf8e-5968004b9021");\n        el.textContent = "BokehJS " + Bokeh.version + " successfully loaded.";\n      } else if (Date.now() < window._bokeh_timeout) {\n        setTimeout(display_loaded, 100)\n      }\n    }\n  \n    function run_callbacks() {\n      try {\n        window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n      }\n      finally {\n        delete window._bokeh_onload_callbacks\n      }\n      console.info("Bokeh: all callbacks have finished");\n    }\n  \n    function load_libs(js_urls, callback) {\n      window._bokeh_onload_callbacks.push(callback);\n      if (window._bokeh_is_loading > 0) {\n        console.log("Bokeh: BokehJS is being loaded, scheduling callback at", now());\n        return null;\n      }\n      if (js_urls == null || js_urls.length === 0) {\n        run_callbacks();\n        return null;\n      }\n      console.log("Bokeh: BokehJS not loaded, scheduling load and callback at", now());\n      window._bokeh_is_loading = js_urls.length;\n      for (var i = 0; i < js_urls.length; i++) {\n        var url = js_urls[i];\n        var s = document.createElement(\'script\');\n        s.src = url;\n        s.async = false;\n        s.onreadystatechange = s.onload = function() {\n          window._bokeh_is_loading--;\n          if (window._bokeh_is_loading === 0) {\n            console.log("Bokeh: all BokehJS libraries loaded");\n            run_callbacks()\n          }\n        };\n        s.onerror = function() {\n          console.warn("failed to load library " + url);\n        };\n        console.log("Bokeh: injecting script tag for BokehJS library: ", url);\n        document.getElementsByTagName("head")[0].appendChild(s);\n      }\n    };var element = document.getElementById("821dab70-4483-4e0e-bf8e-5968004b9021");\n    if (element == null) {\n      console.log("Bokeh: ERROR: autoload.js configured with elementid \'821dab70-4483-4e0e-bf8e-5968004b9021\' but no matching script tag was found. ")\n      return false;\n    }\n  \n    var js_urls = [];\n  \n    var inline_js = [\n      function(Bokeh) {\n        (function() {\n          var fn = function() {\n            var docs_json = {"27a4f8bc-0178-45c7-924f-30b434d08d4f":{"roots":{"references":[{"attributes":{"data_source":{"id":"62351c25-5323-4507-afc2-3d2c32fa3c02","type":"ColumnDataSource"},"glyph":{"id":"60cb0fdd-9d11-4564-b9ad-a99b1ad60b6e","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"d03fe533-f2cb-42f3-9a1c-2d92c705243a","type":"GlyphRenderer"},{"attributes":{"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"}},"id":"2a2fa7ff-7e07-4bfd-8134-82178c136707","type":"HelpTool"},{"attributes":{"below":[{"id":"7aa5f56a-d94b-4348-aeec-33af33363f48","type":"CategoricalAxis"}],"css_classes":null,"left":[{"id":"7a64fc1c-80cd-42f3-be0f-bc09be4d7f2f","type":"LinearAxis"}],"plot_height":510,"plot_width":681,"renderers":[{"id":"4cce0c56-75f4-4fd1-8146-1f3f8ed66c76","type":"BoxAnnotation"},{"id":"0197e969-c6ae-4fbf-83d9-7a9e498dc37e","type":"GlyphRenderer"},{"id":"2d02120d-5568-4601-b980-561f6099b9b4","type":"GlyphRenderer"},{"id":"87825143-56cc-4e88-a45c-c33e7edf4394","type":"GlyphRenderer"},{"id":"0d032b5f-85a9-4457-8024-273403e0eb3d","type":"GlyphRenderer"},{"id":"fa622a73-502c-4304-b2c5-1e8e369efc6b","type":"GlyphRenderer"},{"id":"baeb2dd4-fedd-4366-bfb3-6f35db7690fd","type":"GlyphRenderer"},{"id":"fc90d852-3cbf-4154-9e25-6ce29b292e2f","type":"GlyphRenderer"},{"id":"ce9b27e6-409f-48ef-8827-3341eda5a7ef","type":"GlyphRenderer"},{"id":"ae658f90-27f3-4bb7-a526-e0881f12edb7","type":"GlyphRenderer"},{"id":"53cc7482-e35b-406b-a22f-134ce5c908ea","type":"GlyphRenderer"},{"id":"307e6af3-d604-4f8b-8319-c784b86dd09c","type":"GlyphRenderer"},{"id":"7daf725c-381b-4dfe-ba38-f8ee956720aa","type":"GlyphRenderer"},{"id":"18c9412b-9621-48f3-a428-6d38e0d7174a","type":"GlyphRenderer"},{"id":"799d375d-1ce3-483d-9332-fa105911996d","type":"GlyphRenderer"},{"id":"5c6e7c9e-8b49-4ea7-82aa-c19eccd1c5bf","type":"GlyphRenderer"},{"id":"32d320a8-3386-4013-9d1f-3721070bc08b","type":"GlyphRenderer"},{"id":"1a60d042-6c8f-463c-bc55-ee56bdab5840","type":"GlyphRenderer"},{"id":"1e56de5c-65d6-4085-b46d-f3b8768244c2","type":"GlyphRenderer"},{"id":"d03fe533-f2cb-42f3-9a1c-2d92c705243a","type":"GlyphRenderer"},{"id":"3c2343de-47bd-4b9f-857e-f36e05d75b93","type":"GlyphRenderer"},{"id":"7aa5f56a-d94b-4348-aeec-33af33363f48","type":"CategoricalAxis"},{"id":"7a64fc1c-80cd-42f3-be0f-bc09be4d7f2f","type":"LinearAxis"},{"id":"a712aa3c-029d-456e-be7a-b09f85fa8c8b","type":"Grid"}],"title":{"id":"994c5a65-25f0-40f1-a70a-72a4aab2c427","type":"Title"},"tool_events":{"id":"3b386fe8-8400-475d-8df7-1c7a3d4fda7f","type":"ToolEvents"},"toolbar":{"id":"671fe1c0-1012-4340-a740-b1704cbf15ed","type":"Toolbar"},"toolbar_location":null,"x_range":{"id":"57d699fa-ae5b-4a2c-82c4-f6e3d81eab3e","type":"FactorRange"},"x_scale":{"id":"bc3ec092-0c39-4945-b0b8-06215b9ab94f","type":"CategoricalScale"},"y_range":{"id":"a4261ba5-a014-4f83-b763-9dec2c4be248","type":"Range1d"},"y_scale":{"id":"c21b9259-09bb-4ec6-894f-043c3871d63c","type":"LinearScale"}},"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"},{"attributes":{"data_source":{"id":"430a0891-42bd-4594-b004-b5eb5c7a3c35","type":"ColumnDataSource"},"glyph":{"id":"9a990ea1-9ad3-43b0-84f2-47eef09762e4","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"7daf725c-381b-4dfe-ba38-f8ee956720aa","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"29fe3d04-2b96-4fb9-8a99-2d59b4da8143","type":"Rect"},{"attributes":{"data_source":{"id":"a4ad0b59-d6d8-4ed2-b96e-d212a42af4fd","type":"ColumnDataSource"},"glyph":{"id":"1650cd5a-32c7-4e0c-b7ed-bbc107184151","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"fc90d852-3cbf-4154-9e25-6ce29b292e2f","type":"GlyphRenderer"},{"attributes":{"children":[{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"}]},"id":"42af952c-f1bd-485d-9e10-e368c9561d92","type":"Row"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"14c49bd8-2159-417d-932b-2d2c91e80170","type":"Rect"},{"attributes":{},"id":"3b386fe8-8400-475d-8df7-1c7a3d4fda7f","type":"ToolEvents"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"df3a7ce5-b646-47f4-b743-69910d536219","type":"PanTool"},{"id":"a0d09775-50f7-4d88-9d9f-0d27dc3ed4c5","type":"WheelZoomTool"},{"id":"b0f9bac7-7031-4504-b01a-4ca17972ba79","type":"BoxZoomTool"},{"id":"5aba4c24-ca81-477d-b4a1-cc7b55d54aec","type":"SaveTool"},{"id":"e7c37953-ea9a-4d1d-936a-cfd4a1aa375a","type":"ResetTool"},{"id":"2a2fa7ff-7e07-4bfd-8134-82178c136707","type":"HelpTool"}]},"id":"671fe1c0-1012-4340-a740-b1704cbf15ed","type":"Toolbar"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"0c44d959-8892-4c52-941e-425fa34ab0f4","type":"Rect"},{"attributes":{"sizing_mode":"scale_width","toolbar_location":"above","tools":[{"id":"df3a7ce5-b646-47f4-b743-69910d536219","type":"PanTool"},{"id":"a0d09775-50f7-4d88-9d9f-0d27dc3ed4c5","type":"WheelZoomTool"},{"id":"b0f9bac7-7031-4504-b01a-4ca17972ba79","type":"BoxZoomTool"},{"id":"5aba4c24-ca81-477d-b4a1-cc7b55d54aec","type":"SaveTool"},{"id":"e7c37953-ea9a-4d1d-936a-cfd4a1aa375a","type":"ResetTool"},{"id":"2a2fa7ff-7e07-4bfd-8134-82178c136707","type":"HelpTool"}]},"id":"3ff6ed25-4034-4b10-b743-c127cae5fb2a","type":"ToolbarBox"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2012,"zone":"Camping Equipment"}],"color":["#407ee7"],"fill_alpha":[0.8],"height":[5.0],"label":[{"year":2012,"zone":"Camping Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Camping Equipment:0.6"],"y":[2.5],"year":[2012],"zone":["Camping Equipment"]}},"id":"232f0d57-7398-4eb2-a6f2-deac66761595","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"ef1e9471-e4b6-4e53-b96f-e20180a6194d","type":"ColumnDataSource"},"glyph":{"id":"0c44d959-8892-4c52-941e-425fa34ab0f4","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"0d032b5f-85a9-4457-8024-273403e0eb3d","type":"GlyphRenderer"},{"attributes":{"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"}},"id":"e7c37953-ea9a-4d1d-936a-cfd4a1aa375a","type":"ResetTool"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2011,"zone":"Camping Equipment"}],"color":["#5ab738"],"fill_alpha":[0.8],"height":[4.0],"label":[{"year":2011,"zone":"Camping Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Camping Equipment:0.4"],"y":[2.0],"year":[2011],"zone":["Camping Equipment"]}},"id":"3a1efae9-5799-4304-82ce-0d4aeb600da1","type":"ColumnDataSource"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"5893d7bc-6c3e-4b91-84ee-005bb2f4322d","type":"Rect"},{"attributes":{},"id":"de031e79-a323-4d1a-87aa-fdcdf7c55eba","type":"CategoricalTickFormatter"},{"attributes":{"dimension":1,"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"},"ticker":{"id":"8ef6f837-135b-4cbf-a7bd-e3bd8b4b1c08","type":"BasicTicker"}},"id":"a712aa3c-029d-456e-be7a-b09f85fa8c8b","type":"Grid"},{"attributes":{},"id":"8ef6f837-135b-4cbf-a7bd-e3bd8b4b1c08","type":"BasicTicker"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2013,"zone":"Mountaineering Equipment"}],"color":["#df5320"],"fill_alpha":[0.8],"height":[3.0],"label":[{"year":2013,"zone":"Mountaineering Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Mountaineering Equipment:0.8"],"y":[1.5],"year":[2013],"zone":["Mountaineering Equipment"]}},"id":"430a0891-42bd-4594-b004-b5eb5c7a3c35","type":"ColumnDataSource"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"60cb0fdd-9d11-4564-b9ad-a99b1ad60b6e","type":"Rect"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2010,"zone":"Golf Equipment"}],"color":["#f22c40"],"fill_alpha":[0.8],"height":[1.0],"label":[{"year":2010,"zone":"Golf Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Golf Equipment:0.2"],"y":[0.5],"year":[2010],"zone":["Golf Equipment"]}},"id":"d9003ec0-5f9f-462a-bfa9-631d829dc77a","type":"ColumnDataSource"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2010,"zone":"Mountaineering Equipment"}],"color":["#f22c40"],"fill_alpha":[0.8],"height":[1.0],"label":[{"year":2010,"zone":"Mountaineering Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Mountaineering Equipment:0.2"],"y":[0.5],"year":[2010],"zone":["Mountaineering Equipment"]}},"id":"97c3c6bf-a525-41d8-983e-7b91ca0f0134","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"7d1c3ae2-5332-413c-9bc9-d353adf3d915","type":"ColumnDataSource"},"glyph":{"id":"f51394d9-8afc-45c6-b1dc-af5639dc9e71","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"0197e969-c6ae-4fbf-83d9-7a9e498dc37e","type":"GlyphRenderer"},{"attributes":{"overlay":{"id":"4cce0c56-75f4-4fd1-8146-1f3f8ed66c76","type":"BoxAnnotation"},"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"}},"id":"b0f9bac7-7031-4504-b01a-4ca17972ba79","type":"BoxZoomTool"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"736ad19f-f2ba-4e34-9281-9fe8d47d8d0a","type":"Rect"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2013,"zone":"Camping Equipment"}],"color":["#df5320"],"fill_alpha":[0.8],"height":[8.0],"label":[{"year":2013,"zone":"Camping Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Camping Equipment:0.8"],"y":[4.0],"year":[2013],"zone":["Camping Equipment"]}},"id":"ef1e9471-e4b6-4e53-b96f-e20180a6194d","type":"ColumnDataSource"},{"attributes":{"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"}},"id":"5aba4c24-ca81-477d-b4a1-cc7b55d54aec","type":"SaveTool"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2012,"zone":"Outdoor Protection"}],"color":["#407ee7"],"fill_alpha":[0.8],"height":[5.0],"label":[{"year":2012,"zone":"Outdoor Protection"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Outdoor Protection:0.6"],"y":[2.5],"year":[2012],"zone":["Outdoor Protection"]}},"id":"2ee5cc55-de8e-46bc-bdac-5367ced38ce2","type":"ColumnDataSource"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2010,"zone":"Personal Accessories"}],"color":["#f22c40"],"fill_alpha":[0.8],"height":[2.0],"label":[{"year":2010,"zone":"Personal Accessories"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Personal Accessories:0.2"],"y":[1.0],"year":[2010],"zone":["Personal Accessories"]}},"id":"4b614db4-8492-4edb-8885-7bd7243fa74a","type":"ColumnDataSource"},{"attributes":{},"id":"572eb915-b01f-48bc-82c5-e04f0d28671d","type":"BasicTickFormatter"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"d2aac25c-a485-46ed-b4d0-3f7e3eb472e4","type":"Rect"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2011,"zone":"Personal Accessories"}],"color":["#5ab738"],"fill_alpha":[0.8],"height":[2.0],"label":[{"year":2011,"zone":"Personal Accessories"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Personal Accessories:0.4"],"y":[1.0],"year":[2011],"zone":["Personal Accessories"]}},"id":"1ffd7828-49d7-4aa1-8499-ace2a442fc54","type":"ColumnDataSource"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2011,"zone":"Mountaineering Equipment"}],"color":["#5ab738"],"fill_alpha":[0.8],"height":[2.0],"label":[{"year":2011,"zone":"Mountaineering Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Mountaineering Equipment:0.4"],"y":[1.0],"year":[2011],"zone":["Mountaineering Equipment"]}},"id":"2434b723-3401-4164-8b99-cab33b2e4613","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"bcc3be77-8211-4ef7-8634-13adafbf13cb","type":"ColumnDataSource"},"glyph":{"id":"5d579ead-ae8f-4a7a-9042-ee693bb78d8f","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"307e6af3-d604-4f8b-8319-c784b86dd09c","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"98382b08-8074-4cfd-92dc-dbab64472e05","type":"Rect"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"5d579ead-ae8f-4a7a-9042-ee693bb78d8f","type":"Rect"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"33fc71a1-264a-48d8-bcca-dcad0105ccaa","type":"Rect"},{"attributes":{"data_source":{"id":"3a1efae9-5799-4304-82ce-0d4aeb600da1","type":"ColumnDataSource"},"glyph":{"id":"5893d7bc-6c3e-4b91-84ee-005bb2f4322d","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"2d02120d-5568-4601-b980-561f6099b9b4","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"817eb178-5fc0-44e1-830b-2987a98a0b9e","type":"Rect"},{"attributes":{"callback":null,"end":13.65},"id":"a4261ba5-a014-4f83-b763-9dec2c4be248","type":"Range1d"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2012,"zone":"Golf Equipment"}],"color":["#407ee7"],"fill_alpha":[0.8],"height":[5.0],"label":[{"year":2012,"zone":"Golf Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Golf Equipment:0.6"],"y":[2.5],"year":[2012],"zone":["Golf Equipment"]}},"id":"a4ad0b59-d6d8-4ed2-b96e-d212a42af4fd","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"0871ce24-bfa6-42e4-831c-69e9acfa0d9d","type":"ColumnDataSource"},"glyph":{"id":"29b1a69c-c006-4cc5-b145-1835d2d173b8","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"baeb2dd4-fedd-4366-bfb3-6f35db7690fd","type":"GlyphRenderer"},{"attributes":{"plot":null,"text":null},"id":"994c5a65-25f0-40f1-a70a-72a4aab2c427","type":"Title"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"plot":null,"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"4cce0c56-75f4-4fd1-8146-1f3f8ed66c76","type":"BoxAnnotation"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"905440b4-701c-4b7e-b620-3f5bf263de43","type":"Rect"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1650cd5a-32c7-4e0c-b7ed-bbc107184151","type":"Rect"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2013,"zone":"Personal Accessories"}],"color":["#df5320"],"fill_alpha":[0.8],"height":[4.0],"label":[{"year":2013,"zone":"Personal Accessories"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Personal Accessories:0.8"],"y":[2.0],"year":[2013],"zone":["Personal Accessories"]}},"id":"8e877e56-8249-441c-80d5-3db28ad5fa16","type":"ColumnDataSource"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"9a990ea1-9ad3-43b0-84f2-47eef09762e4","type":"Rect"},{"attributes":{"data_source":{"id":"0ef36a36-9c34-434d-b872-49cdd8feec00","type":"ColumnDataSource"},"glyph":{"id":"8ace1490-6a29-4233-bc61-36598830da89","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"32d320a8-3386-4013-9d1f-3721070bc08b","type":"GlyphRenderer"},{"attributes":{"callback":null,"factors":["Camping Equipment","Golf Equipment","Mountaineering Equipment","Outdoor Protection","Personal Accessories"]},"id":"57d699fa-ae5b-4a2c-82c4-f6e3d81eab3e","type":"FactorRange"},{"attributes":{"data_source":{"id":"2ee5cc55-de8e-46bc-bdac-5367ced38ce2","type":"ColumnDataSource"},"glyph":{"id":"905440b4-701c-4b7e-b620-3f5bf263de43","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"5c6e7c9e-8b49-4ea7-82aa-c19eccd1c5bf","type":"GlyphRenderer"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2010,"zone":"Outdoor Protection"}],"color":["#f22c40"],"fill_alpha":[0.8],"height":[2.0],"label":[{"year":2010,"zone":"Outdoor Protection"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Outdoor Protection:0.2"],"y":[1.0],"year":[2010],"zone":["Outdoor Protection"]}},"id":"4b4be926-7538-4927-a5e7-4158529c40a7","type":"ColumnDataSource"},{"attributes":{"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"}},"id":"a0d09775-50f7-4d88-9d9f-0d27dc3ed4c5","type":"WheelZoomTool"},{"attributes":{},"id":"c21b9259-09bb-4ec6-894f-043c3871d63c","type":"LinearScale"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"8ace1490-6a29-4233-bc61-36598830da89","type":"Rect"},{"attributes":{"data_source":{"id":"232f0d57-7398-4eb2-a6f2-deac66761595","type":"ColumnDataSource"},"glyph":{"id":"817eb178-5fc0-44e1-830b-2987a98a0b9e","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"87825143-56cc-4e88-a45c-c33e7edf4394","type":"GlyphRenderer"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2011,"zone":"Outdoor Protection"}],"color":["#5ab738"],"fill_alpha":[0.8],"height":[4.0],"label":[{"year":2011,"zone":"Outdoor Protection"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Outdoor Protection:0.4"],"y":[2.0],"year":[2011],"zone":["Outdoor Protection"]}},"id":"3f417639-d52d-4b96-8863-aa3ae045ae7b","type":"ColumnDataSource"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2013,"zone":"Outdoor Protection"}],"color":["#df5320"],"fill_alpha":[0.8],"height":[8.0],"label":[{"year":2013,"zone":"Outdoor Protection"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Outdoor Protection:0.8"],"y":[4.0],"year":[2013],"zone":["Outdoor Protection"]}},"id":"0ef36a36-9c34-434d-b872-49cdd8feec00","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"8e877e56-8249-441c-80d5-3db28ad5fa16","type":"ColumnDataSource"},"glyph":{"id":"3b10a8ec-9576-4119-9a48-3d2a87bad1db","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"3c2343de-47bd-4b9f-857e-f36e05d75b93","type":"GlyphRenderer"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2010,"zone":"Camping Equipment"}],"color":["#f22c40"],"fill_alpha":[0.8],"height":[13.0],"label":[{"year":2010,"zone":"Camping Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Camping Equipment:0.2"],"y":[6.5],"year":[2010],"zone":["Camping Equipment"]}},"id":"7d1c3ae2-5332-413c-9bc9-d353adf3d915","type":"ColumnDataSource"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"3d570acd-88b8-4a04-bfde-136acca43286","type":"Rect"},{"attributes":{"axis_label":"Zone","formatter":{"id":"de031e79-a323-4d1a-87aa-fdcdf7c55eba","type":"CategoricalTickFormatter"},"major_label_orientation":0.7853981633974483,"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"},"ticker":{"id":"f42293a8-9b73-48f5-900d-171eb7f8f78a","type":"CategoricalTicker"}},"id":"7aa5f56a-d94b-4348-aeec-33af33363f48","type":"CategoricalAxis"},{"attributes":{"data_source":{"id":"97c3c6bf-a525-41d8-983e-7b91ca0f0134","type":"ColumnDataSource"},"glyph":{"id":"33fc71a1-264a-48d8-bcca-dcad0105ccaa","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"ae658f90-27f3-4bb7-a526-e0881f12edb7","type":"GlyphRenderer"},{"attributes":{"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"}},"id":"df3a7ce5-b646-47f4-b743-69910d536219","type":"PanTool"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"3b10a8ec-9576-4119-9a48-3d2a87bad1db","type":"Rect"},{"attributes":{},"id":"f42293a8-9b73-48f5-900d-171eb7f8f78a","type":"CategoricalTicker"},{"attributes":{"data_source":{"id":"d9003ec0-5f9f-462a-bfa9-631d829dc77a","type":"ColumnDataSource"},"glyph":{"id":"3d570acd-88b8-4a04-bfde-136acca43286","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"fa622a73-502c-4304-b2c5-1e8e369efc6b","type":"GlyphRenderer"},{"attributes":{"data_source":{"id":"1ffd7828-49d7-4aa1-8499-ace2a442fc54","type":"ColumnDataSource"},"glyph":{"id":"98382b08-8074-4cfd-92dc-dbab64472e05","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"1e56de5c-65d6-4085-b46d-f3b8768244c2","type":"GlyphRenderer"},{"attributes":{"data_source":{"id":"3f417639-d52d-4b96-8863-aa3ae045ae7b","type":"ColumnDataSource"},"glyph":{"id":"14c49bd8-2159-417d-932b-2d2c91e80170","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"799d375d-1ce3-483d-9332-fa105911996d","type":"GlyphRenderer"},{"attributes":{"children":[{"id":"3ff6ed25-4034-4b10-b743-c127cae5fb2a","type":"ToolbarBox"},{"id":"6978e1b3-0641-4f1e-b18f-4b70204406c2","type":"Column"}]},"id":"80989747-a5f4-4536-9e7d-f0e2f1a82e1a","type":"Column"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2012,"zone":"Mountaineering Equipment"}],"color":["#407ee7"],"fill_alpha":[0.8],"height":[3.0],"label":[{"year":2012,"zone":"Mountaineering Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Mountaineering Equipment:0.6"],"y":[1.5],"year":[2012],"zone":["Mountaineering Equipment"]}},"id":"bcc3be77-8211-4ef7-8634-13adafbf13cb","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"4b4be926-7538-4927-a5e7-4158529c40a7","type":"ColumnDataSource"},"glyph":{"id":"b70fc030-94ca-4b24-8bd1-a88f281a8b35","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"18c9412b-9621-48f3-a428-6d38e0d7174a","type":"GlyphRenderer"},{"attributes":{"data_source":{"id":"2434b723-3401-4164-8b99-cab33b2e4613","type":"ColumnDataSource"},"glyph":{"id":"736ad19f-f2ba-4e34-9281-9fe8d47d8d0a","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"53cc7482-e35b-406b-a22f-134ce5c908ea","type":"GlyphRenderer"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2011,"zone":"Golf Equipment"}],"color":["#5ab738"],"fill_alpha":[0.8],"height":[5.0],"label":[{"year":2011,"zone":"Golf Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Golf Equipment:0.4"],"y":[2.5],"year":[2011],"zone":["Golf Equipment"]}},"id":"0871ce24-bfa6-42e4-831c-69e9acfa0d9d","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"d101f5b3-1998-46fe-8b01-935965687f0c","type":"ColumnDataSource"},"glyph":{"id":"d2aac25c-a485-46ed-b4d0-3f7e3eb472e4","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"ce9b27e6-409f-48ef-8827-3341eda5a7ef","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"29b1a69c-c006-4cc5-b145-1835d2d173b8","type":"Rect"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2012,"zone":"Personal Accessories"}],"color":["#407ee7"],"fill_alpha":[0.8],"height":[3.0],"label":[{"year":2012,"zone":"Personal Accessories"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Personal Accessories:0.6"],"y":[1.5],"year":[2012],"zone":["Personal Accessories"]}},"id":"62351c25-5323-4507-afc2-3d2c32fa3c02","type":"ColumnDataSource"},{"attributes":{},"id":"bc3ec092-0c39-4945-b0b8-06215b9ab94f","type":"CategoricalScale"},{"attributes":{"data_source":{"id":"4b614db4-8492-4edb-8885-7bd7243fa74a","type":"ColumnDataSource"},"glyph":{"id":"29fe3d04-2b96-4fb9-8a99-2d59b4da8143","type":"Rect"},"hover_glyph":null,"muted_glyph":null},"id":"1a60d042-6c8f-463c-bc55-ee56bdab5840","type":"GlyphRenderer"},{"attributes":{"callback":null,"column_names":["label","color","height","fill_alpha","y","x","width","line_alpha","line_color"],"data":{"chart_index":[{"year":2013,"zone":"Golf Equipment"}],"color":["#df5320"],"fill_alpha":[0.8],"height":[5.0],"label":[{"year":2013,"zone":"Golf Equipment"}],"line_alpha":[1.0],"line_color":["white"],"width":[0.2],"x":["Golf Equipment:0.8"],"y":[2.5],"year":[2013],"zone":["Golf Equipment"]}},"id":"d101f5b3-1998-46fe-8b01-935965687f0c","type":"ColumnDataSource"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"f51394d9-8afc-45c6-b1dc-af5639dc9e71","type":"Rect"},{"attributes":{"axis_label":"unique_customers","formatter":{"id":"572eb915-b01f-48bc-82c5-e04f0d28671d","type":"BasicTickFormatter"},"plot":{"id":"170e50df-c1a1-47dc-93bd-b11a6c4ea8ef","subtype":"Chart","type":"Plot"},"ticker":{"id":"8ef6f837-135b-4cbf-a7bd-e3bd8b4b1c08","type":"BasicTicker"}},"id":"7a64fc1c-80cd-42f3-be0f-bc09be4d7f2f","type":"LinearAxis"},{"attributes":{"children":[{"id":"42af952c-f1bd-485d-9e10-e368c9561d92","type":"Row"}]},"id":"6978e1b3-0641-4f1e-b18f-4b70204406c2","type":"Column"},{"attributes":{"fill_alpha":{"field":"fill_alpha"},"fill_color":{"field":"color"},"height":{"field":"height","units":"data"},"line_color":{"field":"line_color"},"width":{"field":"width","units":"data"},"x":{"field":"x"},"y":{"field":"y"}},"id":"b70fc030-94ca-4b24-8bd1-a88f281a8b35","type":"Rect"}],"root_ids":["80989747-a5f4-4536-9e7d-f0e2f1a82e1a"]},"title":"Bokeh Application","version":"0.12.6"}};\n            var render_items = [{"docid":"27a4f8bc-0178-45c7-924f-30b434d08d4f","elementid":"821dab70-4483-4e0e-bf8e-5968004b9021","modelid":"80989747-a5f4-4536-9e7d-f0e2f1a82e1a"}];\n            \n            Bokeh.embed.embed_items(docs_json, render_items);\n          };\n          if (document.readyState != "loading") fn();\n          else document.addEventListener("DOMContentLoaded", fn);\n        })();\n      },\n      function(Bokeh) {\n      }\n    ];\n  \n    function run_inline_js() {\n      \n      if ((window.Bokeh !== undefined) || (force === true)) {\n        for (var i = 0; i < inline_js.length; i++) {\n          inline_js[i](window.Bokeh);\n        }if (force === true) {\n          display_loaded();\n        }} else if (Date.now() < window._bokeh_timeout) {\n        setTimeout(run_inline_js, 100);\n      } else if (!window._bokeh_failed_load) {\n        console.log("Bokeh: BokehJS failed to load within specified timeout.");\n        window._bokeh_failed_load = true;\n      } else if (force !== true) {\n        var cell = $(document.getElementById("821dab70-4483-4e0e-bf8e-5968004b9021")).parents(\'.cell\').data().cell;\n        cell.output_area.append_execute_result(NB_LOAD_WARNING)\n      }\n  \n    }\n  \n    if (window._bokeh_is_loading === 0) {\n      console.log("Bokeh: BokehJS loaded, going straight to plotting");\n      run_inline_js();\n    } else {\n      load_libs(js_urls, function() {\n        console.log("Bokeh: BokehJS plotting callback run at", now());\n        run_inline_js();\n      });\n    }\n  }(this));\n</script>\n                    \n                '}</pre>
"""