feat(plugins/community/stock): migrate to d3
This commit is contained in:
1 parent
6ddca1810a
commit
6ae962439c
3 files changed
+100
-45
No files matched your search
@@ -1,34 +1,99 @@
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" class="ct-chart" style="filter: grayscale(0.9)" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:ct="http://gionkunz.github.com/chartist-js/ct" width="480" height="160" class="ct-chart-line">
|
||||
<!-- (optimized css) -->
|
||||
<g class="ct-grids">
|
||||
<line y1="125" y2="125" x1="50" x2="465" class="ct-grid ct-vertical"/>
|
||||
<line y1="103" y2="103" x1="50" x2="465" class="ct-grid ct-vertical"/>
|
||||
<line y1="81" y2="81" x1="50" x2="465" class="ct-grid ct-vertical"/>
|
||||
<line y1="59" y2="59" x1="50" x2="465" class="ct-grid ct-vertical"/>
|
||||
<line y1="37" y2="37" x1="50" x2="465" class="ct-grid ct-vertical"/>
|
||||
<line y1="15" y2="15" x1="50" x2="465" class="ct-grid ct-vertical"/>
|
||||
</g>
|
||||
<g>
|
||||
<g class="ct-series ct-series-a">
|
||||
<path d="M50,125L50,60.881C50.732,59.554,51.464,58.019,52.196,56.899C52.928,55.779,53.66,53.995,54.392,53.995C55.123,53.995,55.855,54.611,56.587,54.611C57.319,54.611,58.051,50.761,58.783,50.761C59.515,50.761,60.247,51.289,60.979,51.289C61.711,51.289,62.443,50.57,63.175,49.837C63.907,49.104,64.638,45.915,65.37,45.316C66.102,44.717,66.834,44.456,67.566,44.194C68.298,43.932,69.03,43.589,69.762,43.589C70.494,43.589,71.226,44.7,71.958,44.7C72.69,44.7,73.422,44.282,74.153,44.282C74.885,44.282,75.617,47.34,76.349,47.34C77.081,47.34,77.813,45.061,78.545,44.7C79.277,44.339,80.009,44.018,80.741,44.018C81.473,44.018,82.205,44.59,82.937,44.59C83.668,44.59,84.4,43.077,85.132,43.028C85.864,42.979,86.596,42.997,87.328,42.951C88.06,42.905,88.792,42.599,89.524,42.225C90.256,41.851,90.988,40.05,91.72,39.75C92.451,39.45,93.183,39.463,93.915,39.2C94.647,38.938,95.379,37.814,96.111,37.814C96.843,37.814,97.575,41.158,98.307,41.158C99.039,41.158,99.771,41.115,100.503,41.037C101.235,40.959,101.966,37.198,102.698,37.198C103.43,37.198,104.162,37.305,104.894,37.44C105.626,37.575,106.358,38.694,107.09,38.694C107.822,38.694,108.554,37.209,109.286,37.209C110.018,37.209,110.75,37.745,111.481,38.32C112.213,38.895,112.945,42.17,113.677,42.17C114.409,42.17,115.141,39.216,115.873,39.112C116.605,39.008,117.337,38.947,118.069,38.947C118.801,38.947,119.533,39.825,120.265,39.86C120.996,39.895,121.728,39.915,122.46,39.915C123.192,39.915,123.924,39.915,124.656,39.915C125.388,39.915,126.12,39.728,126.852,39.728C127.584,39.728,128.316,44.272,129.048,45.305C129.78,46.338,130.511,46.774,131.243,47.45C131.975,48.126,132.707,49.375,133.439,49.375C134.171,49.375,134.903,49.1,135.635,49.1C136.367,49.1,137.099,51.377,137.831,51.377C138.563,51.377,139.295,50.491,140.026,50.057C140.758,49.623,141.49,49.184,142.222,48.77C142.954,48.356,143.686,47.571,144.418,47.571C145.15,47.571,145.882,48.01,146.614,48.308C147.346,48.606,148.078,49.441,148.81,49.441C149.541,49.441,150.273,48.553,151.005,48C151.737,47.447,152.469,46.652,153.201,46.042C153.933,45.432,154.665,44.368,155.397,44.326C156.129,44.284,156.861,44.26,157.593,44.26C158.325,44.26,159.056,44.282,159.788,44.282C160.52,44.282,161.252,41.578,161.984,40.663C162.716,39.748,163.448,38.452,164.18,38.452C164.912,38.452,165.644,39.561,166.376,40.113C167.108,40.665,167.84,41.763,168.571,41.763C169.303,41.763,170.035,38.14,170.767,38.133C171.499,38.126,172.231,38.122,172.963,38.122C173.695,38.122,174.427,38.594,175.159,38.716C175.891,38.838,176.623,38.98,177.354,38.98C178.086,38.98,178.818,38.65,179.55,38.65C180.282,38.65,181.014,38.943,181.746,39.288C182.478,39.633,183.21,42.038,183.942,42.038C184.674,42.038,185.406,40.498,186.138,40.498C186.869,40.498,187.601,55.117,188.333,55.117C189.065,55.117,189.797,52.07,190.529,52.07C191.261,52.07,191.993,55.502,192.725,55.502C193.457,55.502,194.189,52.496,194.921,51.146C195.653,49.796,196.384,47.631,197.116,47.362C197.848,47.093,198.58,47.2,199.312,46.911C200.044,46.623,200.776,36.208,201.508,36.208C202.24,36.208,202.972,37.606,203.704,38.826C204.436,40.046,205.168,44.903,205.899,44.903C206.631,44.903,207.363,42.785,208.095,42.785C208.827,42.785,209.559,52.592,210.291,52.592C211.023,52.592,211.755,50.477,212.487,49.754C213.219,49.032,213.951,48,214.683,48C215.414,48,216.146,50.274,216.878,51.729C217.61,53.184,218.342,56.994,219.074,56.994C219.806,56.994,220.538,55.799,221.27,55.799C222.002,55.799,222.734,56.16,223.466,56.16C224.198,56.16,224.929,56.069,225.661,56.069C226.393,56.069,227.125,58.692,227.857,58.692C228.589,58.692,229.321,53.71,230.053,52.697C230.785,51.684,231.517,51.329,232.249,50.662C232.981,49.995,233.713,49.336,234.444,48.693C235.176,48.05,235.908,46.801,236.64,46.801C237.372,46.801,238.104,48.006,238.836,48.649C239.568,49.292,240.3,50.667,241.032,50.667C241.764,50.667,242.496,49.648,243.228,48.748C243.959,47.848,244.691,44.205,245.423,44.205C246.155,44.205,246.887,45.797,247.619,46.009C248.351,46.221,249.083,46.394,249.815,46.394C250.547,46.394,251.279,45.468,252.011,44.722C252.743,43.976,253.474,41.336,254.206,41.336C254.938,41.336,255.67,41.359,256.402,41.4C257.134,41.441,257.866,43.513,258.598,43.589C259.33,43.665,260.062,43.634,260.794,43.71C261.526,43.786,262.257,45.525,262.989,45.525C263.721,45.525,264.453,41.95,265.185,41.95C265.917,41.95,266.649,44.579,267.381,44.579C268.113,44.579,268.845,42.926,269.577,41.587C270.309,40.248,271.041,35.787,271.772,35.482C272.504,35.177,273.236,35.089,273.968,34.987C274.7,34.885,275.432,34.878,276.164,34.767C276.896,34.656,277.628,34.074,278.36,34.074C279.092,34.074,279.824,41.07,280.556,41.07C281.287,41.07,282.019,40.914,282.751,40.696C283.483,40.478,284.215,38.089,284.947,38.089C285.679,38.089,286.411,38.754,287.143,38.754C287.875,38.754,288.607,38.611,289.339,38.535C290.071,38.459,290.802,38.298,291.534,38.298C292.266,38.298,292.998,40.596,293.73,40.69C294.462,40.783,295.194,40.839,295.926,40.839C296.658,40.839,297.39,39.176,298.122,38.87C298.854,38.564,299.586,38.624,300.317,38.271C301.049,37.9Line truncated
|
||||
<path d="M50,60.881C50.732,59.554,51.464,58.019,52.196,56.899C52.928,55.779,53.66,53.995,54.392,53.995C55.123,53.995,55.855,54.611,56.587,54.611C57.319,54.611,58.051,50.761,58.783,50.761C59.515,50.761,60.247,51.289,60.979,51.289C61.711,51.289,62.443,50.57,63.175,49.837C63.907,49.104,64.638,45.915,65.37,45.316C66.102,44.717,66.834,44.456,67.566,44.194C68.298,43.932,69.03,43.589,69.762,43.589C70.494,43.589,71.226,44.7,71.958,44.7C72.69,44.7,73.422,44.282,74.153,44.282C74.885,44.282,75.617,47.34,76.349,47.34C77.081,47.34,77.813,45.061,78.545,44.7C79.277,44.339,80.009,44.018,80.741,44.018C81.473,44.018,82.205,44.59,82.937,44.59C83.668,44.59,84.4,43.077,85.132,43.028C85.864,42.979,86.596,42.997,87.328,42.951C88.06,42.905,88.792,42.599,89.524,42.225C90.256,41.851,90.988,40.05,91.72,39.75C92.451,39.45,93.183,39.463,93.915,39.2C94.647,38.938,95.379,37.814,96.111,37.814C96.843,37.814,97.575,41.158,98.307,41.158C99.039,41.158,99.771,41.115,100.503,41.037C101.235,40.959,101.966,37.198,102.698,37.198C103.43,37.198,104.162,37.305,104.894,37.44C105.626,37.575,106.358,38.694,107.09,38.694C107.822,38.694,108.554,37.209,109.286,37.209C110.018,37.209,110.75,37.745,111.481,38.32C112.213,38.895,112.945,42.17,113.677,42.17C114.409,42.17,115.141,39.216,115.873,39.112C116.605,39.008,117.337,38.947,118.069,38.947C118.801,38.947,119.533,39.825,120.265,39.86C120.996,39.895,121.728,39.915,122.46,39.915C123.192,39.915,123.924,39.915,124.656,39.915C125.388,39.915,126.12,39.728,126.852,39.728C127.584,39.728,128.316,44.272,129.048,45.305C129.78,46.338,130.511,46.774,131.243,47.45C131.975,48.126,132.707,49.375,133.439,49.375C134.171,49.375,134.903,49.1,135.635,49.1C136.367,49.1,137.099,51.377,137.831,51.377C138.563,51.377,139.295,50.491,140.026,50.057C140.758,49.623,141.49,49.184,142.222,48.77C142.954,48.356,143.686,47.571,144.418,47.571C145.15,47.571,145.882,48.01,146.614,48.308C147.346,48.606,148.078,49.441,148.81,49.441C149.541,49.441,150.273,48.553,151.005,48C151.737,47.447,152.469,46.652,153.201,46.042C153.933,45.432,154.665,44.368,155.397,44.326C156.129,44.284,156.861,44.26,157.593,44.26C158.325,44.26,159.056,44.282,159.788,44.282C160.52,44.282,161.252,41.578,161.984,40.663C162.716,39.748,163.448,38.452,164.18,38.452C164.912,38.452,165.644,39.561,166.376,40.113C167.108,40.665,167.84,41.763,168.571,41.763C169.303,41.763,170.035,38.14,170.767,38.133C171.499,38.126,172.231,38.122,172.963,38.122C173.695,38.122,174.427,38.594,175.159,38.716C175.891,38.838,176.623,38.98,177.354,38.98C178.086,38.98,178.818,38.65,179.55,38.65C180.282,38.65,181.014,38.943,181.746,39.288C182.478,39.633,183.21,42.038,183.942,42.038C184.674,42.038,185.406,40.498,186.138,40.498C186.869,40.498,187.601,55.117,188.333,55.117C189.065,55.117,189.797,52.07,190.529,52.07C191.261,52.07,191.993,55.502,192.725,55.502C193.457,55.502,194.189,52.496,194.921,51.146C195.653,49.796,196.384,47.631,197.116,47.362C197.848,47.093,198.58,47.2,199.312,46.911C200.044,46.623,200.776,36.208,201.508,36.208C202.24,36.208,202.972,37.606,203.704,38.826C204.436,40.046,205.168,44.903,205.899,44.903C206.631,44.903,207.363,42.785,208.095,42.785C208.827,42.785,209.559,52.592,210.291,52.592C211.023,52.592,211.755,50.477,212.487,49.754C213.219,49.032,213.951,48,214.683,48C215.414,48,216.146,50.274,216.878,51.729C217.61,53.184,218.342,56.994,219.074,56.994C219.806,56.994,220.538,55.799,221.27,55.799C222.002,55.799,222.734,56.16,223.466,56.16C224.198,56.16,224.929,56.069,225.661,56.069C226.393,56.069,227.125,58.692,227.857,58.692C228.589,58.692,229.321,53.71,230.053,52.697C230.785,51.684,231.517,51.329,232.249,50.662C232.981,49.995,233.713,49.336,234.444,48.693C235.176,48.05,235.908,46.801,236.64,46.801C237.372,46.801,238.104,48.006,238.836,48.649C239.568,49.292,240.3,50.667,241.032,50.667C241.764,50.667,242.496,49.648,243.228,48.748C243.959,47.848,244.691,44.205,245.423,44.205C246.155,44.205,246.887,45.797,247.619,46.009C248.351,46.221,249.083,46.394,249.815,46.394C250.547,46.394,251.279,45.468,252.011,44.722C252.743,43.976,253.474,41.336,254.206,41.336C254.938,41.336,255.67,41.359,256.402,41.4C257.134,41.441,257.866,43.513,258.598,43.589C259.33,43.665,260.062,43.634,260.794,43.71C261.526,43.786,262.257,45.525,262.989,45.525C263.721,45.525,264.453,41.95,265.185,41.95C265.917,41.95,266.649,44.579,267.381,44.579C268.113,44.579,268.845,42.926,269.577,41.587C270.309,40.248,271.041,35.787,271.772,35.482C272.504,35.177,273.236,35.089,273.968,34.987C274.7,34.885,275.432,34.878,276.164,34.767C276.896,34.656,277.628,34.074,278.36,34.074C279.092,34.074,279.824,41.07,280.556,41.07C281.287,41.07,282.019,40.914,282.751,40.696C283.483,40.478,284.215,38.089,284.947,38.089C285.679,38.089,286.411,38.754,287.143,38.754C287.875,38.754,288.607,38.611,289.339,38.535C290.071,38.459,290.802,38.298,291.534,38.298C292.266,38.298,292.998,40.596,293.73,40.69C294.462,40.783,295.194,40.839,295.926,40.839C296.658,40.839,297.39,39.176,298.122,38.87C298.854,38.564,299.586,38.624,300.317,38.271C301.049,37.917,301.Line truncated
|
||||
</g>
|
||||
</g>
|
||||
<g class="ct-labels">
|
||||
<text x="50" y="145" width="2.195767195767196" height="20" class="ct-label ct-horizontal ct-end">26/01, 09:00</text>
|
||||
<text x="153.2010582010582" y="145" width="2.195767195767189" height="20" class="ct-label ct-horizontal ct-end">26/01, 12:55</text>
|
||||
<text x="256.4021164021164" y="145" width="2.195767195767189" height="20" class="ct-label ct-horizontal ct-end">26/01, 17:05</text>
|
||||
<text x="359.60317460317464" y="145" width="2.195767195767189" height="20" class="ct-label ct-horizontal ct-end">26/01, 21:00</text>
|
||||
<text x="462.8042328042328" y="145" width="30" height="20" class="ct-label ct-horizontal ct-end">27/01, 00:55</text>
|
||||
<text y="125" x="40" height="22" width="30" class="ct-label ct-vertical ct-start">880</text>
|
||||
<text y="103" x="40" height="22" width="30" class="ct-label ct-vertical ct-start">900</text>
|
||||
<text y="81" x="40" height="22" width="30" class="ct-label ct-vertical ct-start">920</text>
|
||||
<text y="59" x="40" height="22" width="30" class="ct-label ct-vertical ct-start">940</text>
|
||||
<text y="37" x="40" height="22" width="30" class="ct-label ct-vertical ct-start">960</text>
|
||||
<text y="15" x="40" height="30" width="30" class="ct-label ct-vertical ct-start">980</text>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="ct-legend">
|
||||
</div>
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" class="ct-chart" style="filter: grayscale(0.9)">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="200">
|
||||
<g transform="translate(10,155)" fill="none" font-size="10" font-family="sans-serif"
|
||||
text-anchor="middle">
|
||||
<path class="domain" stroke="rgba(127, 127, 127, .8)" d="M10.5,0.5H460.5" />
|
||||
<g class="tick" opacity="1" transform="translate(10.5,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">04 AM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(57.69179678396644,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">05 AM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(104.88359356793288,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">06 AM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(152.07539035189933,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">07 AM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(199.26718713586575,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">08 AM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(246.4589839198322,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">09 AM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(293.65078070379866,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">10 AM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(340.8425774877651,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">11 AM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(388.0343742717315,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">12 PM</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(435.22617105569793,0)">
|
||||
<line stroke="currentColor" y2="6" stroke-opacity="0.5" />
|
||||
<text fill="rgba(127, 127, 127, .8)" y="9" dy="0.71em"
|
||||
transform="translate(-5,5) rotate(-45)" style="text-anchor: end;">01 PM</text>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="translate(10,10)" fill="none" font-size="10" font-family="sans-serif"
|
||||
text-anchor="start">
|
||||
<g class="tick" opacity="1" transform="translate(0,22.525291066853548)">
|
||||
<line stroke="currentColor" x2="460" stroke-opacity="0.5" stroke-dasharray="2,2" />
|
||||
<text fill="rgba(127, 127, 127, .8)" x="0" dy="-4">264</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(0,38.45465750897091)">
|
||||
<line stroke="currentColor" x2="460" stroke-opacity="0.5" stroke-dasharray="2,2" />
|
||||
<text fill="rgba(127, 127, 127, .8)" x="0" dy="-4">263</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(0,54.38402395108828)">
|
||||
<line stroke="currentColor" x2="460" stroke-opacity="0.5" stroke-dasharray="2,2" />
|
||||
<text fill="rgba(127, 127, 127, .8)" x="0" dy="-4">262</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(0,70.31339039320562)">
|
||||
<line stroke="currentColor" x2="460" stroke-opacity="0.5" stroke-dasharray="2,2" />
|
||||
<text fill="rgba(127, 127, 127, .8)" x="0" dy="-4">261</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(0,86.24275683532298)">
|
||||
<line stroke="currentColor" x2="460" stroke-opacity="0.5" stroke-dasharray="2,2" />
|
||||
<text fill="rgba(127, 127, 127, .8)" x="0" dy="-4">260</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(0,102.17212327744035)">
|
||||
<line stroke="currentColor" x2="460" stroke-opacity="0.5" stroke-dasharray="2,2" />
|
||||
<text fill="rgba(127, 127, 127, .8)" x="0" dy="-4">259</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(0,118.1014897195577)">
|
||||
<line stroke="currentColor" x2="460" stroke-opacity="0.5" stroke-dasharray="2,2" />
|
||||
<text fill="rgba(127, 127, 127, .8)" x="0" dy="-4">258</text>
|
||||
</g>
|
||||
<g class="tick" opacity="1" transform="translate(0,134.03085616167508)">
|
||||
<line stroke="currentColor" x2="460" stroke-opacity="0.5" stroke-dasharray="2,2" />
|
||||
<text fill="rgba(127, 127, 127, .8)" x="0" dy="-4">257</text>
|
||||
</g>
|
||||
</g>
|
||||
<path transform="translate(10,10)"
|
||||
d="M10,71.088L13.933,65.035L17.865,65.512L21.798,60.574L25.731,64.238L29.663,63.123L33.596,65.672L37.529,63.123L41.461,59.778L45.394,56.911L49.326,61.212L53.259,63.442L57.192,63.601L61.124,66.468L65.057,66.468L68.99,65.831L72.922,72.999L76.855,78.415L80.788,82.398L84.72,84.15L88.653,96.893L92.586,84.309L96.518,94.663L100.451,95.778L104.384,99.123L108.316,102.787L112.249,106.292L116.182,96.893L120.114,104.858L124.047,112.663L127.979,101.831L131.912,114.097L135.845,122.221L139.777,133.531L143.71,130.345L147.643,127.159L151.575,124.77L155.508,119.672L159.441,116.009L163.373,127.318L167.306,124.292L171.239,130.345L175.171,145L179.104,140.062L183.037,138.15L186.969,142.451L190.902,126.203L194.835,132.575L198.767,139.903L202.7,136.08L206.632,131.938L210.565,134.009L214.498,128.433L218.43,128.752L222.363,125.566L226.296,133.212L230.228,132.734L234.161,131.46L238.094,124.427L242.026,122.062L245.959,117.872L249.892,124.451L253.824,119.513L269.555,59.778L273.488,72.841L277.42,63.92L281.353,65.035L285.285,35.565L289.218,47.671L293.151,18.68L297.083,29.194L301.016,49.264L304.949,46.399L308.881,49.742L312.814,47.831L316.747,56.592L320.679,38.353L324.612,42.574L328.545,42.255L332.477,28.716L336.41,10L340.343,21.866L344.275,28.079L348.208,21.229L352.141,20.273L356.073,21.229L360.006,25.211L363.938,28.238L367.871,31.742L371.804,24.096L375.736,16.37L379.669,28.397L383.602,20.432L387.534,27.76L391.467,43.371L395.4,52.769L399.332,45.919L403.265,51.654L407.198,54.68L411.13,48.468L415.063,53.725L418.996,56.154L422.928,50.857L426.861,53.088L430.794,55.795L434.726,55.477L438.659,41.619L442.591,25.052L446.524,26.326L450.457,26.167L454.389,20.114L458.322,21.07L460,22.663"
|
||||
fill="transparent" stroke="#87ceeb" stroke-width="2" />
|
||||
<path transform="translate(10,10)"
|
||||
d="M10,145L13.933,145L17.865,145L21.798,145L25.731,145L29.663,145L33.596,145L37.529,145L41.461,145L45.394,145L49.326,145L53.259,145L57.192,145L61.124,145L65.057,145L68.99,145L72.922,145L76.855,145L80.788,145L84.72,145L88.653,145L92.586,145L96.518,145L100.451,145L104.384,145L108.316,145L112.249,145L116.182,145L120.114,145L124.047,145L127.979,145L131.912,145L135.845,145L139.777,145L143.71,145L147.643,145L151.575,145L155.508,145L159.441,145L163.373,145L167.306,145L171.239,145L175.171,145L179.104,145L183.037,145L186.969,145L190.902,145L194.835,145L198.767,145L202.7,145L206.632,145L210.565,145L214.498,145L218.43,145L222.363,145L226.296,145L230.228,145L234.161,145L238.094,145L242.026,145L245.959,145L249.892,145L253.824,145L269.555,145L273.488,145L277.42,145L281.353,145L285.285,145L289.218,145L293.151,145L297.083,145L301.016,145L304.949,145L308.881,145L312.814,145L316.747,145L320.679,145L324.612,145L328.545,145L332.477,145L336.41,145L340.343,145L344.275,145L348.208,145L352.141,145L356.073,145L360.006,145L363.938,145L367.871,145L371.804,145L375.736,145L379.669,145L383.602,145L387.534,145L391.467,145L395.4,145L399.332,145L403.265,145L407.198,145L411.13,145L415.063,145L418.996,145L422.928,145L426.861,145L430.794,145L434.726,145L438.659,145L442.591,145L446.524,145L450.457,145L454.389,145L458.322,145L460,145L460,22.663L458.322,21.07L454.389,20.114L450.457,26.167L446.524,26.326L442.591,25.052L438.659,41.619L434.726,55.477L430.794,55.795L426.861,53.088L422.928,50.857L418.996,56.154L415.063,53.725L411.13,48.468L407.198,54.68L403.265,51.654L399.332,45.919L395.4,52.769L391.467,43.371L387.534,27.76L383.602,20.432L379.669,28.397L375.736,16.37L371.804,24.096L367.871,31.742L363.938,28.238L360.006,25.211L356.073,21.229L352.141,20.273L348.208,21.229L344.275,28.079L340.343,21.866L336.41,10L332.477,28.716L328.545,42.255L324.612,42.574L320.679,38.353L316.747,56.592L312.814,47.831L308.881,49.742L304.949,46.399L301.016,49.264L297.083,29.194L293.151,18.68L289.218,47.671L285.285,35.565L281.353,65.035L277.42,63.92L273.488,72.841L269.555,59.778L253.824,119.513L249.892,124.451L245.959,117.872L242.026,122.062L238.094,124.427L234.161,131.46L230.228,132.734L226.296,133.212L222.363,125.566L218.43,128.752L214.498,128.433L210.565,134.009L206.632,131.938L202.7,136.08L198.767,139.903L194.835,132.575L190.902,126.203L186.969,142.451L183.037,138.15L179.104,140.062L175.171,145L171.239,130.345L167.306,124.292L163.373,127.318L159.441,116.009L155.508,119.672L151.575,124.77L147.643,127.159L143.71,130.345L139.777,133.531L135.845,122.221L131.912,114.097L127.979,101.831L124.047,112.663L120.114,104.858L116.182,96.893L112.249,106.292L108.316,102.787L104.384,99.123L100.451,95.778L96.518,94.663L92.586,84.309L88.653,96.893L84.72,84.15L80.788,82.398L76.855,78.415L72.922,72.999L68.99,65.831L65.057,66.468L61.124,66.468L57.192,63.601L53.259,63.442L49.326,61.212L45.394,56.911L41.461,59.778L37.529,63.123L33.596,65.672L29.663,63.123L25.731,64.238L21.798,60.574L17.865,65.512L13.933,65.035L10,71.088Z"
|
||||
fill="rgba(88, 166, 255, .1)" />
|
||||
</svg>
|
||||
</div>
|
||||
@@ -31,17 +31,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal
|
||||
|
||||
//Generating chart
|
||||
console.debug(`metrics/compute/${login}/plugins > stock > generating chart`)
|
||||
const chart = await imports.chartist("line", {
|
||||
width: 480 * (1 + data.large),
|
||||
height: 160,
|
||||
showPoint: false,
|
||||
axisX: {showGrid: false, labelInterpolationFnc: (value, index) => index % Math.floor(close.length / 4) === 0 ? value : null},
|
||||
axisY: {scaleMinSpace: 20},
|
||||
showArea: true,
|
||||
}, {
|
||||
labels: timestamp.map(timestamp => new Intl.DateTimeFormat("en-GB", {month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit"}).format(new Date(timestamp * 1000))),
|
||||
series: [close],
|
||||
})
|
||||
const chart = imports.Graph.timeline(close.map((y, i) => ({x:new Date(timestamp[i]*1000), y})), {low:Math.min(...close), high:Math.max(...close), points:false, text:false, width: 480 * (1 + data.large), height:200})
|
||||
|
||||
//Results
|
||||
return {chart, currency, price, previous, delta: price - previous, symbol, company, interval, duration}
|
||||
|
||||
@@ -19,7 +19,7 @@ inputs:
|
||||
type: boolean
|
||||
default: no
|
||||
extras:
|
||||
- metrics.npm.optional.chartist
|
||||
- metrics.npm.optional.d3
|
||||
- metrics.api.yahoo.finance
|
||||
|
||||
plugin_stock_token:
|
||||
|
||||
Reference in new issue
Block a user