tvjsx / trading-vue-js

💹 Hackable charting lib for traders. You can draw literally ANYTHING on top of candlestick charts. [Not Maintained]
https://tvjsx.github.io/trading-vue-demo/
MIT License
2.09k stars 637 forks source link

Chart type #213

Closed elsandyid closed 3 years ago

elsandyid commented 3 years ago

It looks great for my needs, but I'he a question. Can I change the type of each chart I use? Like replace the candles with bars or something else?

lakshanperera commented 3 years ago

Yes, it is possible. You can change the chart.type in the DataCube instance of your program to update the chart type.

chart.type='Candles'; // ==> CandleStick type
chart.type='Spline'; // ==> Line type
chart.type='XOhlcBars'; // ==> Bar type, but you need to install the free overlay pack

You can download the free overlay pack here

elsandyid commented 3 years ago

Yes, it is possible. You can change the chart.type in the DataCube instance of your program to update the chart type.

chart.type='Candles'; // ==> CandleStick type
chart.type='Spline'; // ==> Line type
chart.type='XOhlcBars'; // ==> Bar type, but you need to install the free overlay pack

You can download the free overlay pack here

Nice, but one more question. Can I just add the js file package for html view like your trading-vue-js-demo? Or I have to run it with npm?

lakshanperera commented 3 years ago

Hi @elsandyid

I don't think I have understood the question correctly, but if you are referring to the installation of the tvjs-overlays (free overlay pack), yes you have to install the npm package.

However, if you want to use few overlays only, you can also copy the relevant .vue component of the overlay (xOhlcBars.vue in your case) and the extra primitives that it uses to your project without installing the full npm package.

elsandyid commented 3 years ago

sorry for a confusing question @lakshanperera I mean can I wrote just for html code (browser) only with all the library include. Cause I have check the tradingvuedemo and it still can view the chart (without . vue file)

lakshanperera commented 3 years ago

Yeah but during development, we have to use vue, later it will be converted into just htmland js (though DOM will be manipulated at runtime by JS)