Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Lull3rSkat3r/de8fe965a27737d109f7 to your computer and use it in GitHub Desktop.
Save Lull3rSkat3r/de8fe965a27737d109f7 to your computer and use it in GitHub Desktop.
Color Palette Is Not Aligned With Series
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<link rel='import' is='urth-core-import' href='urth_components/urth-viz-chart/urth-viz-chart.html'>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%html\n",
"<link rel='import' is='urth-core-import' href='urth_components/urth-viz-chart/urth-viz-chart.html'>"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<script>\n",
" UrthData.setItem('palette', ['red','orange','blue','pink','purple','green'])\n",
" UrthData.setItem('test-data', {\n",
" \"columns\":[\n",
" \"Positive Metric A\",\n",
" \"Negative Metric A\",\n",
" \"Positive Metric B\",\n",
" \"Negative Metric B\",\n",
" \"Positive Metric C\",\n",
" \"Negative Metric C\"\n",
" ],\n",
" \"metadata\":{\"interval\":0.5},\n",
" \"rows\":[[\"2015-10-26T20:01:03.936000\",57,4,23,44,78,10],[\"2015-10-26T08:01:03.936000\",52,1,24,42,77,12],[\"2015-10-25T20:01:03.936000\",60,7,30,45,71,20],[\"2015-10-25T08:01:03.936000\",60,2,25,50,79,11],[\"2015-10-24T20:01:03.936000\",58,9,22,48,76,10],[\"2015-10-24T08:01:03.936000\",56,1,28,41,76,12],[\"2015-10-23T20:01:03.936000\",53,10,30,44,80,12],[\"2015-10-23T08:01:03.936000\",53,3,25,50,76,13],[\"2015-10-22T20:01:03.936000\",52,7,26,45,72,11],[\"2015-10-22T08:01:03.936000\",50,4,24,49,75,13],[\"2015-10-21T20:01:03.936000\",60,5,26,40,79,18],[\"2015-10-21T08:01:03.936000\",58,3,22,46,75,17],[\"2015-10-20T20:01:03.936000\",53,2,27,42,74,10],[\"2015-10-20T08:01:03.936000\",58,7,21,50,75,16],[\"2015-10-19T20:01:03.936000\",54,10,26,41,80,14],[\"2015-10-19T08:01:03.936000\",59,5,23,49,75,14],[\"2015-10-18T20:01:03.936000\",59,5,21,42,77,11],[\"2015-10-18T08:01:03.936000\",56,7,21,46,72,14],[\"2015-10-17T20:01:03.936000\",57,6,24,47,77,18],[\"2015-10-17T08:01:03.936000\",56,0,21,50,75,11],[\"2015-10-16T20:01:03.936000\",54,6,26,44,72,16],[\"2015-10-16T08:01:03.936000\",51,7,23,48,80,10],[\"2015-10-15T20:01:03.936000\",51,3,26,42,76,18],[\"2015-10-15T08:01:03.936000\",60,4,29,43,70,17],[\"2015-10-14T20:01:03.936000\",58,4,28,46,75,15],[\"2015-10-14T08:01:03.936000\",52,6,20,41,75,17],[\"2015-10-13T20:01:03.936000\",55,4,24,47,70,19],[\"2015-10-13T08:01:03.936000\",53,3,24,49,73,16],[\"2015-10-12T20:01:03.936000\",59,3,28,47,72,16],[\"2015-10-12T08:01:03.936000\",57,2,30,48,72,12]]\n",
" })\n",
"</script>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%html\n",
"<script>\n",
" UrthData.setItem('palette', ['red','orange','blue','pink','purple','green'])\n",
" UrthData.setItem('test-data', {\n",
" \"columns\":[\n",
" \"Positive Metric A\",\n",
" \"Negative Metric A\",\n",
" \"Positive Metric B\",\n",
" \"Negative Metric B\",\n",
" \"Positive Metric C\",\n",
" \"Negative Metric C\"\n",
" ],\n",
" \"metadata\":{\"interval\":0.5},\n",
" \"rows\":[[\"2015-10-26T20:01:03.936000\",57,4,23,44,78,10],[\"2015-10-26T08:01:03.936000\",52,1,24,42,77,12],[\"2015-10-25T20:01:03.936000\",60,7,30,45,71,20],[\"2015-10-25T08:01:03.936000\",60,2,25,50,79,11],[\"2015-10-24T20:01:03.936000\",58,9,22,48,76,10],[\"2015-10-24T08:01:03.936000\",56,1,28,41,76,12],[\"2015-10-23T20:01:03.936000\",53,10,30,44,80,12],[\"2015-10-23T08:01:03.936000\",53,3,25,50,76,13],[\"2015-10-22T20:01:03.936000\",52,7,26,45,72,11],[\"2015-10-22T08:01:03.936000\",50,4,24,49,75,13],[\"2015-10-21T20:01:03.936000\",60,5,26,40,79,18],[\"2015-10-21T08:01:03.936000\",58,3,22,46,75,17],[\"2015-10-20T20:01:03.936000\",53,2,27,42,74,10],[\"2015-10-20T08:01:03.936000\",58,7,21,50,75,16],[\"2015-10-19T20:01:03.936000\",54,10,26,41,80,14],[\"2015-10-19T08:01:03.936000\",59,5,23,49,75,14],[\"2015-10-18T20:01:03.936000\",59,5,21,42,77,11],[\"2015-10-18T08:01:03.936000\",56,7,21,46,72,14],[\"2015-10-17T20:01:03.936000\",57,6,24,47,77,18],[\"2015-10-17T08:01:03.936000\",56,0,21,50,75,11],[\"2015-10-16T20:01:03.936000\",54,6,26,44,72,16],[\"2015-10-16T08:01:03.936000\",51,7,23,48,80,10],[\"2015-10-15T20:01:03.936000\",51,3,26,42,76,18],[\"2015-10-15T08:01:03.936000\",60,4,29,43,70,17],[\"2015-10-14T20:01:03.936000\",58,4,28,46,75,15],[\"2015-10-14T08:01:03.936000\",52,6,20,41,75,17],[\"2015-10-13T20:01:03.936000\",55,4,24,47,70,19],[\"2015-10-13T08:01:03.936000\",53,3,24,49,73,16],[\"2015-10-12T20:01:03.936000\",59,3,28,47,72,16],[\"2015-10-12T08:01:03.936000\",57,2,30,48,72,12]]\n",
" })\n",
"</script>"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<template is=\"urth-core-bind\">\n",
" <urth-viz-chart type='line' palette=\"{{palette}}\"\n",
" datarows='{{test-data.rows}}' \n",
" columns='{{test-data.columns}}'>\n",
" <urth-viz-col index=\"0\" type=\"date\" ></urth-viz-col>\n",
" </urth-viz-chart>\n",
"</template>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%html\n",
"<template is=\"urth-core-bind\">\n",
" <urth-viz-chart type='line' palette=\"{{palette}}\"\n",
" datarows='{{test-data.rows}}' \n",
" columns='{{test-data.columns}}'>\n",
" <urth-viz-col index=\"0\" type=\"date\" ></urth-viz-col>\n",
" </urth-viz-chart>\n",
"</template>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment