• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Dynamic Chart with Check boxes to change the x axis

ashl

Member
Hi guys,


I have a dynamic chart where I can choose a company by a drop down box and it will show me the products under that company on the chart.


I have on the right hand side check boxes with 3 ranges of cost. So I can select for eg products that cost less than $50 under that company.


What I would like to do though is add check boxes which control the x axis. So for eg it would be check box for product and check box for items under that product. This would mean the x axis would change from product names to item names ideally.


I have read this article but the x axis is the same for each checkbox

http://chandoo.org/wp/2010/08/31/dynamic-chart-with-check-boxes/


Is this at all possible (or am i biting more than I can chew) and when it is possible - is it possible to do without a macro or vba code?
 
Hi Faseeh,


Sorry I created a quick example its not exactly what I described but the idea is the same. I want the labels on the x axis to change when a tick box is selected. Is this possible without macros or VBA?


https://www.box.com/s/xdtd78yqpl8i7t9fl19u
 
Hi Ashl,


Please see the uploaded file. and please confirm is this you really need?


https://www.dropbox.com/s/j52kwymjkxvkh0o/Sample2.xlsb


Thanks


Sreekhosh.
 
Hi sreekhosh


Thanks so much for trying, what i'm trying to do is have check boxes on the left hand side for the colour and check boxes under the x axis so that the labels on the x axis change to the fruit items or vegetable items etc depending on what box is ticked. The only axis common to them is the y axis which is the number. The x axis should be dynamic. Do u think this is possible without macro or vba?
 
Hi ashl,


It is possible to do what you want without VBA. I used Sreekhosh's file(hope he doesn't mind) to add your dynamic x-axis. Check out the file below, will this do?


https://www.dropbox.com/s/4ikdsjjzkob9y7y/Changing%20axis.xlsx


Regards,

Injinia
 
Hi guys,


Thanks u, unfortunately i can't access the files at the moment but I'll have a go when I get home and let u know :)
 
Hi guys thanks again for trying :) What I'm trying to do is have 4 charts in one. I want the chart to show the product type on the x axis like it is now vegetable;fruit;dessert. Then I was hoping to change this axis by a check box with the item for example if the checkbox is vegetable, the x axis would change to pumpkin,zucchini,potato. If fruit was checked the x axis would change to apple,banana,grapes etc etc. The y axis would be the number and the colors would be checkboxes to the left. So it would be 4 stacked charts in one.
 
Hi ,


Check out this file , which has option buttons ; if you really want check boxes , so that multiple series can be selected , let me know.


http://speedy.sh/kCc7D/Changing-axis-1.xlsx


Narayan
 
Hi Narayank991,


I think that is what I was trying to do. The only problem is when I select vegeatable and etc i get a warning sign from your spreadsheet saying that there are formulas with invalid references.


Could you exlein to me how u dit it please?
 
Hi ,


I have no idea why the references to the named ranges have changed ; you will have to change them back after downloading the file.


Select Fruit from the Option Button , and after getting rid of the error message , click on the chart , and select the series ; change the series reference to the following :


='Changing-axis-1.xlsx'!Chart_Series


Do the same after selecting vegetable and dessert.


These were the original references , but when I opened the file , I found all of them had become :


=[0]!Chart_Series


Do the same for the horizontal axis labels , which needs to be changed to :


='Changing-axis-1.xlsx'!X_axis


Narayan
 
A big Thank U - U are AWESOME :)I'll let u know if i have any probs


and thanks to everyone else as well :)
 
Back
Top