Comments (7)
When a value on a dataset is null or a dataset is incomplete, a gap appears at that place.
I am marking this as a feature request and looking into it but I'm leaning towards this being a simple oversight. Possibly should be the default behavior. Thanks for filing the issue.
NOTE: This is also replicated in bar charts so look into AxisChart.js
from charts.
Successfully tracked this down to most definitely being a bug.
charts/src/js/utils/helpers.js
Lines 49 to 56 in 9dce5cf
The function for fillArray()
. Does not correctly validate the element
argument. Check if (!element)
Causing it to fail when it's called here when initializing an AxisChart with a value of 0. Since 0 is a falsy
in JS it's no different than false
or undefined
causing if (!element)
to be true always. Whereas, I infer the desired behaviour would be it actually being the value of 0 and not a falsy
.
Effectively killing the desired functionality.
charts/src/js/utils/axis-chart-utils.js
Line 39 in 9dce5cf
As for the fix right now. I am just going to patch the correct element
type validation. But that breaks the animation lifecycle entirely which is rather hacky so the animate
option is going to default to false from this point forward.
from charts.
Validate this and let me know :D
from charts.
I installed from the GitHub
yarn add https://github.com/frappe/charts
cd node_modules
npm i
npm run build
But I can't get it t work, I still get the continuous line 😕
from charts.
Yeah sorry, I should've expanded on the implementation more. Also need to update the docs. So the value continuous
defaults to true, as to not break the existing configs.
Here's how to use the continuous
property to not fill the remaining dataset
const data = {
labels: ["1", "2", "3", "4", "5", "6", "7"],
datasets: [
{
name: "Another Set",
chartType: "line",
values: [10, 20, 25],
},
],
};
const chart = new frappe.Chart("#chart",
title: "My Awesome Chart",
data: data,
type: "line",
height: 800
continuous: 0,
});
from charts.
Hi,
I tried with continuous
, but it is still not working as expected.
I would have liked the dots to stop:
(obtained with the inspector)
Ps: I had a hard time getting the latest version to load. Could you publish a release after that?
from charts.
Yes this is the expected behavior right now. Need to review #243 or something similar for null value support in line charts. This is a stop gap solution right now to draw 0s. Bar charts exhibit the desired behavior.
Ps: I had a hard time getting the latest version to load. Could you publish a release after that?
Yeah thats also work that needs to be done. New release is going to most likely be after I'm done updating the docs and adding CI
from charts.
Related Issues (20)
- A Year-wise Heatmap HOT 2
- How to create combo chart with Dual Y-Axis HOT 1
- Commas to large numbers HOT 1
- Donut chart vertical legend cut off HOT 2
- Bug: adding `lineOptions: { spline: 1 }` leads to a console error HOT 1
- Implement measures and style overrides HOT 1
- how to implement a horizontal bar? HOT 1
- Line chart y-axis is dynamic instead of starting at Zero HOT 1
- Histogram Chart?
- Missing legend causes uncaught errors when updateing data.
- How to declare HTML for charts' labels? HOT 1
- How to get the same design as the website example? HOT 2
- multiple numbers are overwritten for valuesOverPoints set to 1 HOT 2
- Pie Inline Labels HOT 4
- Console errors reporting NaN HOT 1
- Use a linear gradient as line color
- Promise or event for render complete? HOT 1
- Feature Request: Total in tooltip for area chart regionFill
- Stacked and Adjacent bars?
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 charts.