Comments (7)
In my case this would also be needed, because I want to compare two distinct querysets and show the computed diff. Or is there also another possibility to do this kind of tasks?
from django-chartit.
@krautnerds - formatting datetime fields should be possible on the DB level using extra(), please see the latest commits for examples.
Otherwise the possibility to chart using model properties is sounds great but it is not easy to implement at the moment. chartit relies heavily on QuerySet (in fact it uses QuerySet.values() to fetch the data) and this operates on the DB level. It may be possible to rewrite the model manager to allow for this but I'm not sure how well will that work.
from django-chartit.
My problem stems from it using raw data from the DB so all my times are in utc with no good way to convert them to local time.
from django-chartit.
@Sh4kE - can you elaborate more on your use case ? How do you imagine you will compare query sets with chartit ? Without any more info I think you can compute the diff between the two query sets and create a new one from it. Then pass the new QS to chartit for plotting on a chart.
from django-chartit.
@ajurna datetime conversions should be now possible by using extra() or annotate() fields, see changelog and the examples in demo project. Let me know if that works for you ? Maybe we only need to update the docs to make this more visible.
from django-chartit.
timezone and strftime conversions are two very separate things...
doing both makes it look messy and makes it depend on a DB type which doesn't really suit me.
from django-chartit.
@krautnerds @Sh4kE @ajurna - hey guys I know I've been late to respond to this but I think I have finally managed to fix it. Following my changes related to #44 (removal of .values()) chartit now operates on objects instead of dictionaries and it was very easy to call a model property instead of a field.
Can you check out my fork + topic branch and tell me how that works for you? Note that the changes are only for DataPool, not PivotDataPool, which I'm planning to phase out.
from django-chartit.
Related Issues (20)
- 'Options' object has no attribute 'get_all_field_names' HOT 1
- Support for RawQuerySet HOT 3
- 'Graph' object has no attribute 'META' HOT 2
- Change series label on line charts HOT 2
- setting legend order HOT 2
- How to do drilldowns? HOT 2
- Generate Charts from Views? HOT 4
- chartit.shutupandship.com HOT 2
- Publish demo site automatically from Travis CI
- time series data HOT 1
- Uncaught ReferenceError: $ is not defined at chartloader.js:3 HOT 6
- Line chart is not rendering a graph. It's showing {% load chartit %} in browser. HOT 1
- 'NoneType' object is not subscriptable HOT 8
- highcharts formatter
- __proxy__ found error if translated field supplied as "legend_by"
- can this be used by Jinja2 engine? how
- Themes
- column chart data is being sorted by y-axis values HOT 1
- can't import six HOT 1
- django.utils.six
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 django-chartit.