lavolp3 / MMM-AVStock

MagicMirror module for displaying stock price with Alphavantage API
MIT License
38 stars 18 forks source link

disable two colums in table #44

Closed dorinilut closed 3 years ago

dorinilut commented 3 years ago

Hello,

First of all thank you for this great module. second I would like to ask how can I disable the Puch and Profit columns. I can't seem to get rid of them and I would not like to mess with the .js file. Am i missing something? please find below my config file:

         module: "MMM-AVStock",
         position: "top_left",
         config: {
                            apiKey : "hidden for obvious reasons",
                            width : 70,
                            symbols : ["CI","UNH","CVS","ANTM","HUM"],
                            alias: ["CIGNA","UNITED HEALTHCARE","CVS HEALTH","ANTHEM","HUMANA"],
                            mode : "table",
                            showPurchasePrices : false,
                            showPerformance2Purchase: false,
                            showPurchase : false,
                            purchasePrice : false,
                            showChart : false
                  }

image

lavolp3 commented 3 years ago

I thought it was already in the README but apparently not (yet)

You can put this in the config.js.

        tableHeaders: ["symbol", "price", "close", "change", "changeP", "volume"],
        tableHeaderTitles: ["Symbol", "Price", "Close", "CHG", "CHG%", "Vol"],

For the tableHeaders array, you can leave out values, but you MUST NOT change their names. They don't work anymore if you do. I was also going to add a function that removes these values automatically if you don't want to use purchasePrices. I think it's stuck on the local dev branch. Will upload that soon. Until then, be free to use above.

dorinilut commented 3 years ago

Thank you so very much. That worked