mirror of
https://github.com/LukeHagar/pypistats.org.git
synced 2025-12-06 04:21:09 +00:00
plot fix
This commit is contained in:
@@ -1,33 +1,32 @@
|
|||||||
{"data": [
|
{
|
||||||
{
|
"data": [
|
||||||
"x": [
|
{
|
||||||
"2017-05-01",
|
"x": [
|
||||||
"2017-05-02",
|
"2017-05-01",
|
||||||
"2017-05-03"
|
"2017-05-02",
|
||||||
],
|
"2017-05-03"
|
||||||
"y": [
|
],
|
||||||
"345234",
|
"y": [
|
||||||
"123123",
|
"2",
|
||||||
"456344"
|
"5",
|
||||||
],
|
"4"
|
||||||
"name": "Retention",
|
],
|
||||||
"type": "scatter",
|
"name": "Retention",
|
||||||
"mode": "lines+markers",
|
"type": "scatter",
|
||||||
"connectgaps": true,
|
"mode": "lines+markers",
|
||||||
"marker": {
|
"connectgaps": true,
|
||||||
"color": "rgba(61,133,198,1)",
|
"marker": {
|
||||||
"symbol": "circle",
|
"symbol": "circle",
|
||||||
|
"line": {
|
||||||
|
"color": "#444",
|
||||||
|
"width": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
"line": {
|
"line": {
|
||||||
"color": "#444",
|
"shape": "linear",
|
||||||
"width": 1
|
"smoothing": 1,
|
||||||
|
"width": 2
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"line": {
|
|
||||||
"color": "rgba(61,133,198,1)",
|
|
||||||
"shape": "linear",
|
|
||||||
"smoothing": 1,
|
|
||||||
"width": 2
|
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ def package(package):
|
|||||||
plot = deepcopy(plot_base)
|
plot = deepcopy(plot_base)
|
||||||
data = []
|
data = []
|
||||||
for category, values in model["data"].items():
|
for category, values in model["data"].items():
|
||||||
base = deepcopy(data_base)
|
base = deepcopy(data_base["data"][0])
|
||||||
base["x"] = values["x"]
|
base["x"] = values["x"]
|
||||||
base["y"] = values["y"]
|
base["y"] = values["y"]
|
||||||
base["name"] = category.title()
|
base["name"] = category.title()
|
||||||
|
|||||||
Reference in New Issue
Block a user