I recently built a script to create a TOPSIS multi-attribute decision making analysis on some of my data to help pick the best case. The actual calculations are fairly basic from a mathematic perspective, and they work just fine. I built a window to display some information about the data I am working with, the importance weightings used in the calculations in bar chart form, a scatterplot matrix of the results, a 3D scatterplot of the results, and a table with the top 10 cases.
I decided to make this interface more interactive. I want the user to be able to change the importance weightings, redo the calculations, and have the graphs and tables update. I have gotten the calculations redone just fine, but I run into trouble with the display elements. I have a few specific issues here:
1) When I run the calculations again, the data table from which the scatterplots and table get their information is updated. Despite my color and marker selections in the data table, the scatterplot matrix only features regular unselected points after updating (the 3D scatterplot appears to update without issue). Reshow does not fix this problem. I can fix it by running the Redo Analysis command, but that opens a new window. Is there a way to simply replace the old scatterplot matrix in the same window with the Redo Analysis command?
2) I haven't been able to update the table of my top 10 cases. The table is a table box with several Number Column Boxes. I have tried Reshow and using <
3) The final issue I have is that the bar chart is run from a different data table than the other charts and tables. To successfully create all the elements in the first place, I have had to sort of hack this issue by using something like this:
displayElement = currentdatatable(x); Chart(...)
This approach works, but then I can't pass messages to displayElement as though it were a chart. Is there a better way around this issue?
I have been through the manual and been unable to find anything specific about updating already existing display elements besides Reshow. I am relatively new to JSL, especially when it comes to trying to create interactive displays, so hopefully I am just missing something. Thanks in advance for any advice.