I would like to learn how can I make a combobox where users can select their stick index such as S&P500.NASDAQ,DowJones,Others. Then based on the selection a list of listed company tickers is identified and their current stock prices are compared the the highest one is selected. After that I want that the ticker that has the highest price are saved into individual variables for further uses in the program. I appreciate if any one van help me.
I have tried using class with combobox I could get the value of index selected but not being able to get ticker list and make comparisons
Related
i'm pretty new about using spotfire and I've to realize some bar and line charts like those graphs I realized with python and matplotlib :
bar chart from python
line chart from python
In order to realize those graphs, I created a set of unique values for the x axis which contains differents sprints of stories (refer to jira and agile method for more informations) and i created 3 lists (begin, planned and ends) for gathering all of the business values for each sprint occurence. Then I created a pandas dataframe gathering my 4 new lists and I used the columns with matplolib to realize the graphs (the second graph shows the cumulative sum of begin and end business values per sprints).
My question is : is it possible to create a list of unique values for the x axis in spotfire and how to create a data table from another data table, just like I did for the python graphs ? All I can get for the moment by using spotfire is this :
bar and line charts from spotfire
I already tried to merge each graphs of the same category together in order to get the same result however the two x axis (begin and ends) do not have the same number of values and i get some errors if i try. If anyone had a solution that can solve that problem, it would be great.
PS : I can't give any data files cause i'm working for a society and some of those data could be confidential and sorry for potential clerical errors, cause i'm french.
I have a treeview, and I want the items in its uppermost layer to be categories, which then open up to the data. The problem is that I need to place the label of the category in one of my columns in the treeview, and it ends up looking cramped and ugly. I want to make the title ignore columns, spanning the entire row, but Google has not yielded results. Does anyone know how I can achieve such a thing?
I'm trying to create a column where there's a number shown, and after clicking the number, a URL is opened in the browser. Each row in the column will correspond to a different URL. However the URL is too long to display in a cell of its own, as there are a number of other columns to fit, and showing it is just not necessary. What's the best way to invisibly save data (the URL) to a grid cell?
One approach which works is a global variable, just keeping a list of URLs.
Another would be if there was a way to set the URL to the balloon/hover/caption text of individual cells, but I don't think you can set custom ToolTips to cells in wxPython.
Any ideas? Thanks so much.
You can do something along these lines:
Put all the urls in a dict using the numbers displayed in the grid as key.
a = {1:'http:\\www.google.com', 2:'http:\\www.twitter.com', 3:....}
Bind the selection events to an event handler which fetches the number shown in the selected cell and finds the corresponding url for that number from the dict.
I have a bunch of data organized by rows. In the first cell of each row, I want to have a checkbox, so the user can go through and select certain rows.
I know I could make the user use CTRL + click each row, but I rather have checkboxs as this is a feature to be used a lot.
You can use checkboxes for any cell by explicitly setting it up to use wxGridCellBoolRenderer and wxGridCellBoolEditor, but the simplest way to use them is to just use boolean values for the cells in the first column, i.e. define a custom wxGridTable subclass which would return wxGRID_VALUE_BOOL from its GetTypeName() for the first column.
Then the checkboxes will be used automatically.
I'm sure you can find some examples in Python as well, but I can only point you to C++ grid sample, which should hopefully translate to Python in a straightforward way.
I have to display a table with multiple columns but only a single row. Displaying it in the normal way using wxGrid doesnt look appealing at all and makes it hard for the user to read. I want to know if there is any way in which I can flip the table and display its contents vertically? Also is there any other way to make the data more presentable?
Just label the rows with the column names and the make one column. Then you could scroll through it that way. You just need to call SetRowLabelValue(rowNum, label). You may find this tutorial helpful (see the end): http://www.blog.pythonlibrary.org/2010/04/04/wxpython-grid-tips-and-tricks/
You could use a ListBox, but then you'd lose the label information.