Comments (8)
@chihsuan https://github.com/Canner/vega-canner-components
here you go.
from cannercms.
Thanks, @chihsuan, <indicator>
is a great name!
The <datePicker>
is excatly an important tag, thx for point it out . But I still need some time to dig into it (maybe have other pickers?, or different tags design?, etc).
About the data flow of components, I will open another issue to discuss the implementation. But in brief, these components will fetch the data by themselves. For examples, this is a simple example of react-apollo
, you can use <Query>
component to fetch the data with the given graphql query
(the graphql
property in our case) and the variables
(the date filter object in our case)
/**
const where = {
date_gt: 2018-08-17T04:17:25Z
}
const grahpql = `
query AggregateOrders($where: WhereInput!) {
aggregateOrders(where: $where) {
count
}
}
`
**/
// our <indicator> components
const Amount = ({ where, graphql }) => (
<Query query={gql`${graphql}`} variables={{ where }}>
{({ loading, error, data }) => {
if (loading) return null;
if (error) return `Error!: ${error}`;
return (
<div >
{data.aggregateOrders.count}
<div/>
);
}}
</Query>
);
from cannercms.
@abz53378: Thanks for writing down the spec. How about to use<metrics>
, <indicator>
or just <card>
instead of <display>
? Because <display>
might be more likely to consider as a verb which is not consistent with other tags.
And we might still need to have a new tag for picking the time range of data. Like Google Analytics. I think it would be like a container tag which can contain other UI tags but currently, I'm not sure how to control data flow. It might be like:
<datepicker options={} default="" showDelta={true}>
<display ui="list" graphql={``} />
</datepicker>
from cannercms.
Agree with @chihsuan, tags should be more specific the better, cause we might adding additional tags in the future.
+1 for indicator
from cannercms.
@abz53378: As we discussed, I'm trying to implement new chart tags. I am going to create a chart model in canner-script. Since we would need to wrap react-vega components as our components. Should we have a repo for chart components like antd-canner-components
to map the chart tag to its component?
from cannercms.
from cannercms.
@chilijung: Thank you for the quick reply. Sure, vega-canner-components
looks good. But could you please help to create it? I don't have the permission to do that. It's okay to take your time. I can implement new chart tags first since the repo name is determined. Thanks!
from cannercms.
Merged, so I closed it.
from cannercms.
Related Issues (20)
- parse canner schema string to jsx HOT 1
- Unresolved packages after repository clone
- Authentication customization methods don work
- Firestore relation broken parent
- .
- UnhandledPromiseRejectionWarning: Error: File '/**/repo/packages/cli/node_modules/blessed/usr/xterm' was not included into executable on `canner start` HOT 1
- Error: No active screen.
- Support async validation in field level HOT 4
- Improve the typing and pipeline of validation HOT 1
- Schema problem for The "All" select filter item condition (Blog template)
- Add a sidebar menu item will get Network Error
- Warning: Each child in a list should have a unique "key" prop.
- Warning: Failed prop type: Invalid prop `type` of value `` supplied to `Row`, expected one of ["flex"].
- Unable to define directory for firebase storage HOT 2
- Status of canner-slate-editor?
- geoPoint field not loading
- DateTime issue
- It's a very good project.
- Keep it on.
- datasource does not exist HOT 1
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 cannercms.