Comments (2)
hi @mikima yes, it's possible by just throwing a js error in your render
function
throw new Error("Hello error")
that renders like this:
There was a problem showing the error in the frontend, I just fixed it here
https://github.com/rawgraphs/rawgraphs-frontend/commit/9a539ce16c9b794c1675991f94e459b6bc932208
(still needs some styling, but there was a positioning issues and the error was sometimes hidden)
Your specific use case is covered by the dimensions api. When you declare a dimension, you can set minValues and maxValues properties (indipendently) to require/limit the maximum number of values that can be mapped on a multiple dimension.
Like:
export const dimensions = [
{
id: 'axes',
name: 'spokes',
validTypes: ['number'],
required: true,
multiple: true,
minValues: 2,
aggregation: true,
aggregationDefault: {
number: 'sum',
string: 'csvDistinct',
date: 'csvDistinct',
},
},
...
]
This should the way to do it but:
- It's not documented (sorry, working on this!)
- The frontend at the moment does not show this kind of error. This is a mapping error that forbids render, so it's not even shown under the artboard like the error in the screenshot above. We should decide if it should be shown here or in the mapping section.
Personally, I'd show it in the mapped dimension, that is also much easier to implement at the moment
from rawgraphs-charts.
Great! Thanks
from rawgraphs-charts.
Related Issues (20)
- [paired barchart] dates labels are in the long format
- Incorrect sizing of elements in a Voronoi Treemap HOT 3
- Wrap text in treemap HOT 1
- Charts' tooltip & interactivity in general HOT 2
- Sankey Diagram tutorial chart has a bug HOT 3
- Text size cannot be edited on the website HOT 1
- logscale for bubble chart?
- Sankey - uneven node spacing HOT 1
- [Mapping] [Dendrogram chart]
- Bump chart error: not showing the correct levels in y-axis HOT 2
- stacked bar chart doesn't support negative values HOT 3
- Sankey/Alluvial - Incorrect node precision etc. HOT 2
- incorrect jumps in place of monotone smooth curves HOT 1
- Duplication of some names in step 1 HOT 4
- Show hierarchy labels in Voronoi Treemap HOT 3
- typo report
- Padding doesn't work in horizontal bar charts HOT 1
- Flip axis direction HOT 1
- Add like to code and turial for calendar heatmap HOT 1
- bumpchart: labels not correctly aligned
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 rawgraphs-charts.