Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multichart #1938

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

memee
Copy link

@memee memee commented Jan 27, 2017

Multichart was added options barModel and xScale. Now one can use historicalBar in multichart which plays well with lines and additional bars: grids are aligned with bars.

@liquidpele
Copy link
Contributor

This PR contains changes to historicalBar.js too. Please keep each PR containing only a single feature or bugfix, thanks!

@memee
Copy link
Author

memee commented Feb 13, 2017

I'm not sure what options I have left. If one would like to have two bars and lines showing historical data he must use historicalBar. And It can't be done without those changes to historicalBar model.

The only option I see is to prepare completely new bar model inspired by historicalBar and used only in multiChart.

@liquidpele
Copy link
Contributor

I guess I don't understand why the changes to historicalBar.js were needed then. Can you explain it more?

@memee
Copy link
Author

memee commented Feb 20, 2017

In my case I wanted to use multiBarChart with 2 bars, 1 line. By default it used multiBar model for bars. In didn't work in combination with lines - it wasn't aligned. So I provided an option to change scale to time and bar model to historicalBar which has its first and last element placed exactly in the middle of a first and the last tick.

Unfortunately historicalBar was designed to be the only one on the chart. When two historicalBars were set there were errors with tooltips. My modification hopefully doesn't break anything else and provide an option to use historicalBar for multiChart.

Only other option I see is to create historicalMultiBar model which may need some code duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants