Comments (5)
can you create a codesandbox, codepen, ... where I can reproduce the error?
from chartjs-chart-error-bars.
If I have time later tonight, I'll try to create a codepen. I just wanted to say that this bug is showing up for me as well, whenever I use 3.9.0. It seems to work fine for 3.8.0, and below.
from chartjs-chart-error-bars.
it does work on version 3.8.0
from chartjs-chart-error-bars.
one code change I can think of is e2aae8a#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 which removes the "browser" field from th the package.json but I don't know how that could effect things.
from chartjs-chart-error-bars.
this works just fine for me:
import { Chart as ChartJS, Title, Tooltip, LinearScale, CategoryScale, BarElement } from 'chart.js';
import {
BarWithErrorBar,
BarWithErrorBarsController,
PointWithErrorBar,
} from 'chartjs-chart-error-bars';
import { Chart } from 'react-chartjs-2';
// these all registers i tries to add
ChartJS.register(
PointWithErrorBar,
BarWithErrorBarsController,
BarWithErrorBar,
LinearScale,
CategoryScale,
BarElement,
LinearScale,
CategoryScale,
Title,
Tooltip,
);
const options = {
// annotations,
scales: {
x: {
// type: 'time',
// ticks: {
// source: 'auto',
// },
},
y: {
suggestedMin: 0,
},
},
};
const getChartDatasets = (data) => ({
labels: data.map(({ x }) => x),
datasets: [
{
data,
},
],
});
export const BarChartWithErrors = () => {
return <Chart
type="barWithErrorBars"
data={getChartDatasets([{ x: 'a', y: 3, yMin: 1, yMax: 4 }, { x: 'b', y: 2 }, { x: 'c', y: 1 }])}
width={300}
height={200}
options={options}
/>
}
"chartjs-chart-error-bars": "^3.10.0",
"chart.js": "^3.9.1",
"react-chartjs-2": "^4.3.1",
from chartjs-chart-error-bars.
Related Issues (20)
- Removing y-axis labels HOT 1
- Add style options to readme? HOT 3
- lineWithErrorBars HOT 5
- elements.point configurations does not apply in lineWithErrorBars HOT 4
- add license badge
- Setting animation to false breaks line and scatter error bars HOT 3
- Line with error bars fails for linear scale
- Updating a dataset without ErrorBar still draws the ErrorBars HOT 1
- check compatibility for chart.js 2.9.x HOT 1
- ie11 compatibility HOT 1
- String Parsing with Min / Max Values HOT 3
- LineWithErrorBars does not render when using scale of type time HOT 4
- Is there a .js file to import the plugin? HOT 2
- Hello Can you please share how to use chart-error-bars on Line Graph? HOT 2
- chart-error-bars on Line Graph HOT 2
- Sample documentation for styling HOT 4
- AMD import of helpers HOT 1
- Error: "barWithErrorBars" is not a chart type. HOT 1
- Error bar color: Use default dataset color if not provided 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 chartjs-chart-error-bars.