Convert image to bytes instead of png, update dependenci
This commit is contained in:
parent
4445f88e65
commit
dc98f04311
2 changed files with 23 additions and 3 deletions
22
Pipfile.lock
generated
22
Pipfile.lock
generated
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "53a903d4c91bf2e7a69e4d2af6ae5d7801a5ed730b493b72e2268e1d4c038de0"
|
||||
"sha256": "7a09c557aef26e75e57d27c48b21b4a9021fd572aac9f138a5a3c295f5b7f5d4"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -186,6 +186,18 @@
|
|||
"index": "pypi",
|
||||
"version": "==2.2.0"
|
||||
},
|
||||
"kaleido": {
|
||||
"hashes": [
|
||||
"sha256:4670985f28913c2d063c5734d125ecc28e40810141bdb0a46f15b76c1d45f23c",
|
||||
"sha256:845819844c8082c9469d9c17e42621fbf85c2b237ef8a86ec8a8527f98b6512a",
|
||||
"sha256:aa21cf1bf1c78f8fa50a9f7d45e1003c387bd3d6fe0a767cfbbf344b95bdc3a8",
|
||||
"sha256:bb9a5d1f710357d5d432ee240ef6658a6d124c3e610935817b4b42da9c787c05",
|
||||
"sha256:ca6f73e7ff00aaebf2843f73f1d3bacde1930ef5041093fe76b83a15785049a7",
|
||||
"sha256:ecc72635860be616c6b7161807a65c0dbd9b90c6437ac96965831e2e24066552"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.2.1"
|
||||
},
|
||||
"kiwisolver": {
|
||||
"hashes": [
|
||||
"sha256:0cd53f403202159b44528498de18f9285b04482bab2a6fc3f5dd8dbb9352e30d",
|
||||
|
@ -491,6 +503,14 @@
|
|||
"index": "pypi",
|
||||
"version": "==8.1.0"
|
||||
},
|
||||
"plotly": {
|
||||
"hashes": [
|
||||
"sha256:7d8aaeed392e82fb8e0e48899f2d3d957b12327f9d38cdd5802bc574a8a39d91",
|
||||
"sha256:d68fc15fcb49f88db27ab3e0c87110943e65fee02a47f33a8590f541b3042461"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==4.14.3"
|
||||
},
|
||||
"progress": {
|
||||
"hashes": [
|
||||
"sha256:69ecedd1d1bbe71bf6313d88d1e6c4d2957b7f1d4f71312c211257f7dae64372"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import matplotlib.pyplot as plt
|
||||
import matplotlib, io
|
||||
import plotly.express as px
|
||||
import plotly
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
|
@ -94,6 +95,5 @@ def generate_chart(ticker, history):
|
|||
)
|
||||
|
||||
img_bytes = io.BytesIO()
|
||||
img_bytes = fig.to_image(format="png")
|
||||
img_bytes.seek(0)
|
||||
img_bytes = plotly.io.to_image(fig, format="png")
|
||||
return img_bytes
|
||||
|
|
Loading…
Add table
Reference in a new issue