Cannot Draw Grouped Bars (Plugin)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 463
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Thanks for the amazing library. I've been using it for time series and it's a blast. Now I've moved on to grouped bar plots and I'm having some trouble.
I'm trying to use the groupedBarsPlugin as shown in the demos, but I am having some trouble as can be seen in the image below.
I have copied over and adapted the code from the examples online. I tried to migrate it to TypeScript to make it compatible with my project. These results are reported below.
I have a couple questions related to the code:
- Would it be possible to include these plugins inside the
npmpackage so that we could use them in a plug and play fashion? - Is there any obvious reason that the bars are not gettign drawn in my plot?
Plot Opts and Instantiation
// Define Plot Options
const opts = {
title: undefined,
id: props.specification.metadata.uuid || "time-series-plot",
class: props.specification.metadata.uuid || "grouped-bar-series-plot",
width: 0,
height: 0,
series: series,
axes: axes,
plugins: [
seriesBarsPlugin({
radius: 0.3,
ori: 0,
dir: 1,
}),
],
};
// Create new plot instance
plotInstance.value = new uPlot(opts, data, plotRef.value);
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked multi-bars demo and inspect the groupedBarsPlugin and seriesBarsPlugin usage. Compare its plugin invocation with the provided TypeScript options, then reproduce the plot with the supplied configuration and determine what is needed for the bars to render. Done means the cause is identified and a reproducible fix or clarification is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100