Comments (3)
For time series data, you should consider using HighStock instead. Also, highcharts expect datetime data to be in epoch milliseconds in UTC. Here is a code that works:
import panel_highcharts as ph
import numpy as np
import panel as pn
from datetime import datetime
ph.config.theme("auto")
pn.extension('highstock')
raw = np.array([['2020-01-02T00:00:00.000', 0.08724838802601927],
['2020-01-03T00:00:00.000', 0.3505050980452534],
['2020-01-07T00:00:00.000', 0.20308500006387006],
['2020-01-08T00:00:00.000', 0.30082278389285844],
['2020-01-09T00:00:00.000', 0.1532198747144695],
['2020-01-13T00:00:00.000', 0.29617460579831706],
['2020-01-14T00:00:00.000', 0.3101317710656381],
['2020-01-15T00:00:00.000', 0.26286860757963615],
['2020-01-16T00:00:00.000', 0.2246060860444374],
['2020-01-17T00:00:00.000', 0.23607952701269072]])
data = [{
"name": "series",
"data": list(map(lambda data: [datetime.fromisoformat(f"{data[0]}+00:00").timestamp() * 1000, float(data[1])], raw))
}]
configuration = {
"series": data
}
ph.HighStock(object=configuration, sizing_mode="stretch_width")
from panel-highcharts.
So using above worked...
chart = ph.HighStock(object=configuration, sizing_mode="stretch_width")
Thanks @govinda18 ...
from panel-highcharts.
Thanks both. Closing this one.
from panel-highcharts.
Related Issues (18)
- Can you use panel-highcharts in Google Colab? HOT 1
- ImportError: cannot import name 'string_types' from 'panel.util'
- Venn diagram is not supported HOT 1
- run examples\LinkedCharts.ipynb got Keyerror with sourcedata tab not work
- highchart with parameterized throw error HOT 4
- a
- Support for Highcharts wind barb
- the highcharts-more.js file must be loaded HOT 2
- Unable to install with extensions via pip
- Requires panel > 1.0
- Cannot add second series dynamically HOT 2
- support to variwide module HOT 2
- catching JS errors HOT 1
- highcharts_no_data failing HOT 4
- Please prepare package for mypy
- Highstock chart buttons/slider always appear in the front of the panel dashboard HOT 8
- blank graph when running in jupyter HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panel-highcharts.