I have created a line chart based of user input in C#. I would like to use a point on the X-axis based of user input, that would then intersect my line chart and obtain the relative point on the Y-axis. I would like to show this on the line chart through a vertical line extending from the X-axis point to the plot, and then a horizontal line from the plot to the Y-axis point. Thank you for any help.
Member_14192597
Posts
-
How to get C# to obtain relative value on Y-axis from point on X-axis? -
Is a database or a file more suitable to store varying user input and then retrieve values to find average or sum? c#Thank you for your reply, I was wondering if I could have a gridlayout file for each user, rather than a database because I don't need to store the data for a later time (after the user is finished with the app) or I don't need the data to be shared among all users, I just need it to store input from the current user (while the app is still in use) and then retrieve that input in a textbox on a final form, as a sum or average of values inputted into each previous window. However because the number of windows "forms" for each user will be different, and so the number of values added to the list/database/file is not a set amount, I'm trying to figure out how to tell C# to go through each window, pick out the value from that window, add it to the list/database/file, find the average, and display that to a textbox on the a final window. If I was to store the input from each window to a file, then I would need to tell C# to read the file and only pick up the value that I need, add it to a list , find the sum/average and display that to a textbox, however I think it would be difficult to tell C# exactly what to read from the file unless it's in a column/row layout and each cell has a reference.. so I'm not sure how to do this, I have got quite far with the application, and this is the only thing holding me back from completing it, so I would really like to try and make it happen..
-
Is a database or a file more suitable to store varying user input and then retrieve values to find average or sum? c#Well that's the thing, I already have it on Excel, and would like to convert it into an application, and although on DataGridView it may not be as separated, and as clear for the user, it probably is the better approach, and like you said it would be a lot easier to obtain the final values. Thank you for your suggestions.
-
Is a database or a file more suitable to store varying user input and then retrieve values to find average or sum? c#Hello, thank you for your reply, and apologies for the lack of details in my initial question. This is a stand alone application, and the data doesn't need to be saved for a later time, and data will not be shared between users, it's for one user to input their data and carry out an assessment, the user can then note down the results, but none of this needs to be stored into the app for a later time. It's a 2 stage assessment, the first stage requires the user to fill out a number of forms with structural details of columns, depending on how many columns they have, and the second stage needs to sum some of those column values and some will need to be averaged, to then display the final values of the assessment, onto a final form. Only numbers are entered into each form, and results will also be in the form of numbers which are then displayed on a graph. There are around 30 text boxes of user input, which are input into a input form that pops of from a button from the parent form, stage one of the assessment is then carried out for each column on each parent form. Each parent form renderred onto a new tab using this EasyTabs solution Creating a C# Application with Chrome-Style Tabs using EasyTabs in WinForms - YouTube[^] that I found online. I'm an absolute beginner on C# , so I couldn't figure out how I would take a value from each form and display the sum or average onto the final form, if I don't know how many forms there will be for each user during run time, as each user will have a different amount, I was thinking it's maybe some sort of loop during run time, but I'm just not sure what that would look like. After speaking to a friend, they recommended a single form, with a save and refresh button, where the data gets saved onto a file, and then gets retrieved would be better, but there are say 10 different user input values that need to be picked up from each form, and then averaged or summed, I started learning about StreamReader and StreamWriter and how files work in C#, but it was really difficult to figure out how to lay out the data in the file, how to get C# to sum the correct values together etc etc. Thank you for your help.
-
Is a database or a file more suitable to store varying user input and then retrieve values to find average or sum? c#Hello, I have created Windows form application, in which the user inputs data into a form, however the amount of forms each user will have will be different. My initial solution was to have my forms on tabs, and the user can add as many tabs as they want, and a new form gets renderred on each new tab. However I then need to sum and average some of the values from each form, which I struggled to do. It was suggested to me that it would be a better idea to have a single form, and a button which once clicked stores the input data, and refreshes the form, when the user proceeds to the next stage, I would then need to retrieve those values and average or sum them. The stored user input will need to be organised and I will need to recall the values later on. Would it be better to store the user input in a file or to create a database for this sort of thing? I've never done either, so I'm not sure which applies better to the situation. Appreciate any help, thank you.