swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.3k stars 1.15k forks source link

How can I send my chart example with double Y axis into your repository #927

Open habi4ek opened 6 years ago

habi4ek commented 6 years ago

Hi. I have an example of chart with a double Y axis, and I'd like to send it to you in PR, but I was confused by this phrase in your documentation "If you want to have your custom chart featured above, please submit a pull request to this file".

Can you explain to me how to do it correctly?

Need I to add all my code as plain text to this page or make changes to your demo project?onfused

marjan-georgiev commented 6 years ago

You can either create a separate repository and add a link on that page pointing to it, or create it in stackblitz and also link it.

jmsunseri commented 5 years ago

A sample chart with double Y axis would be very helpful. Is one running somewhere?

habi4ek commented 5 years ago

@marjan-georgiev ok I will do it as soon as possible

@jmsunseri you can see it in my site https://binalyze.space/charts?dtFrom=2018-12-03T18:32&dtTo=2018-12-03T19:32&sets=%5B%7B%22set%22:%22%7Bask:0%7D%22,%22exchange%22:%22Cex%22,%22pair%22:%22BTC:USD%22,%22secondAxis%22:false%7D,%7B%22set%22:%22%7Bask:0%7D%22,%22exchange%22:%22Kuna%22,%22pair%22:%22BTC:UAH%22,%22secondAxis%22:true%7D%5D

jmsunseri commented 5 years ago

Thanks!

Sincerely, Justin Sunseri

On Mon, Dec 3, 2018 at 12:41 PM Yurii Ivanov notifications@github.com wrote:

@marjan-georgiev https://github.com/marjan-georgiev ok I will do it as soon as possible

@jmsunseri https://github.com/jmsunseri you can see it in my site

https://binalyze.space/charts?dtFrom=2018-12-03T18:32&dtTo=2018-12-03T19:32&sets=%5B%7B%22set%22:%22%7Bask:0%7D%22,%22exchange%22:%22Cex%22,%22pair%22:%22BTC:USD%22,%22secondAxis%22:false%7D,%7B%22set%22:%22%7Bask:0%7D%22,%22exchange%22:%22Kuna%22,%22pair%22:%22BTC:UAH%22,%22secondAxis%22:true%7D%5D

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/swimlane/ngx-charts/issues/927#issuecomment-443820841, or mute the thread https://github.com/notifications/unsubscribe-auth/AAxHlzLba3qyxKrSxOD2fYvQaGoNVqMxks5u1XB2gaJpZM4VZWf7 .

yonia1 commented 5 years ago

@hobi4ek any updates maybe?

habi4ek commented 5 years ago

Hello everyone, sorry for keeping you waiting. Here is an example of a double axis chart.

https://github.com/hobi4ek/double-axis-chart/

danieldiazastudillo commented 5 years ago

Great work @hobi4ek. It's working even with multi series. I've been trying to make the chart to fit-container with no results, any ideas?

habi4ek commented 5 years ago

@danieldiazastudillo dillo sorry I don't understand what you want to make. Do you want to create a empty chart?

danieldiazastudillo commented 5 years ago

@danieldiazastudillo dillo sorry I don't understand what you want to make. Do you want to create a empty chart?

Yurii, for some reason, the chart is not fitting the entire container unless i'm missing something. It is not using the 100% width of it's container. Even in your repo...

double-chart-container

As you can see, legend container fits 100% with it's container, but the chart itself doesn't. There's a res property that sets this width but i've been unable to make it fully responsive (or fit the entire container).

IngCazzaro commented 5 years ago

Thanks for the example @hobi4ek

marlag commented 3 years ago

Good job @habi4ek - I was inspired to create my custom solution to handle secondary y-axis and split lines on nulls at once. Indeed it is a pity it is not natively implemented as both cases are quite common.

I just wonder why the most of extensions are copying whole code of component they are basis on - not using OOP :) Of course doing it we are dependent on changes in parent implementation but anyway.

If anyone is interested - take a look into my temporary repo. Having no time to make it "runable" and fix all issues (mainly with tooltips, animations and labels) as not needed for my usage. But pre-prepared even for handling more than 2 axes :)

And to be honest - rather expect it will be handled natively by @swimlane (@marjan-georgiev fyi :)). Looking forward for it :) Good job anyway as great lib and easy to extend.