How do I create a bar graph based on textbox inputs?

0 favourites
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hey korbaach, I have another question here. It's about sub-bars. I'm curious, how would I go about creating three thinner sub-bars for/beside each month's bar, and based on what number you type into the new/extra textbox, it will effect one the three sub-bars beside the corresponding month's bar?

  • I'm pretty sure I'll need two new textbox's actually rather than one. One to type in the sub-bar tag-name, and then another one to type in and specify a number amount.

  • I have a different idea...

    how about one new button to toggle between "Bar Mode" and "subBar Mode"

    (boolean instance variable for Textbox: subBar_Mode-false)

    and another button(3 instance) to "Activate" specific subBar...(similar to mothButtons and Bars)

    so..if Textbox is set "subBar_Mode-false" you add Textbox value to Bars...

    if Textbox is set "subBar_Mode-True" you add Textbox value to subBars....

    and you don't need new Textbox(or two)...

    What do you think ?

  • Hey korbaach! Wow, yeah. It looks great but, where's the month bars? I only see the three sub-bars for each month, but not the main month bars. Also, again, can I use/dl the capx to learn from (like I said before, I have a lot easier time learning the code, by playing around with the code... that way, I could change things and see the effects of what I do immediately).

  • Hey korbaach! Yeah, thanks soo much. It's exactly what I envisioned. I've really learned a lot from you. Thanks again for all the help!

  • Hey korbaach! I've been working with you capx (I made a slide effect so that the buttons/menu/texbox are on the left and graph is on the left), but I still have a couple of problems:

    First off, on 'on start of layout', the 'TextYear' text shows, but the 'mimicTextYear' text behind it doesn't seem to act as a shadow until you click the up or down button. Second, when you press the 'BtnMode', the frames on the 'BtnSubBar' button all show the initial frame of 3-3-3, instead of 1-2-3. Lastly, when you press the 'BtnSubBar' buttons, the 'SUBbAR' object doesn't show up at all.

    Can you help me with this capx?

  • Hey I sent you a smaller version of the capx (I sent it to you in a PM). It's less than 100 lines and it now has 4 layers. Can I get some help with it, please?

  • Please korbaach lol, I really need your help man. I just need to figure out these last few things.

  • Hey korbaach, could you help me out? I have a little problem.

    The 'bar' only goes up to a certain height. It's scaled properly, but how can I change the max height that it goes up to?

    Can you show me with this capx? ... ample.capx

    Thanks man.

  • Height is limited to 250 px

    just find all events where you set bar height to clamp....and change value to 350 or..

  • Hey korbaach, thanks a lot. Fixed it!

  • Hey There appears to be another slight problem now, that came out of nowhere:(...

    When I click on the the year '2015' and type in 10, it shows up on the graph fine.

    Like so.

    But when I click on another year like '2016'....

    ... and then click back on the year '2015', like so.

    The January bar/10 (along with all other bars, if I were to input the data for another month/bar) on the '2015' graph changes. The bar/s becomes much larger, in terms of height.

    What happened? All I've recently changed was the height of bars from 250 to 419. Do you know what's causing the problem?


  • guannstar you probably made some mistake when you change action in "update" function..

    compare events with previus version of capx...

    I just tested and works great for me...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey Yeah, you were right. Fixed it! Thanks man.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)