We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How best to build an image selector

Greetings,

I am working on some code to make it easier to customize ggplot2 charts and I would like to build some sort of selector similar to the diagram builder sample groupbar.  In this selector I would like to place various pictures of different charts so a user can select which chart they want to experiment with.  It is kind of like the Tableau ShowMe tab, although I like the look and feel of the diagram builder better.  Do you have a control that is up to the task?

TIA,
Kevin

5 Replies

NG Naganathan Ganesh Babu Syncfusion Team May 8, 2017 11:05 AM UTC

Hi Kevin, 
 
Thanks for contacting Syncfusion support. 
 
Before creating the sample, please confirm us whether your requirement is to add the chart control to the paletteGroupBar and drag and drop that control into the diagram from the palette? If yes, we can achieve your requirement by adding the ChartControl into diagram’s “ControlNode” and drag and drop that ControlNode from the palette.  
 
Otherwise, if you wish to show the already created chart control visually, we can use GroupBar control to achieve your requirement.  
 
Once you confirmed your requirement we will provide the solution/sample as per your requirement. 
 
Regards, 
 
Naganathan K G 
 



KM Kevin McCarty May 8, 2017 01:44 PM UTC

Thanks for replying.  Actually I just want to add images and create a selector with a bunch of different visual chart types, not the actual charts.  The layout would look similar to how the diagram builder looks, with a bunch of different images all spread out with some text.  The group bar only shows one image per line and I was kind of hoping to display a whole suite of images one could pick from.  I am looking at the basic grid at this point.  It seems best suited to this task unless the group bar can do more than stack images vertically.  Your idea of adding the control to the palette does sound interesting.  I will take a look.  I have attached a screenshot of the ShowMe tab from Tableau to give you an idea of what I am talking about.  Appreciate the help, Kevin


Attachment: ShowMe_da4bdc29.zip


KR Kannan R Syncfusion Team May 10, 2017 12:52 PM UTC



Hi Kevin 
 
Thank you for your update.  
 
Could you please confirm if your requirement is to load Custom control in GroupBar Layout? If so, then it can be achieved by using GroupBar and FlowLayoutPanel controls. Please make use of below code snippet for your reference.  
 
Code Snippet: [C#] 
 
 
            this.ImagePanel.FlowDirection = FlowDirection.LeftToRight; 
            this.ImagePanel.AutoScroll = true; 
            for (int i = 0; i < 25; i++) 
            { 
                ButtonAdv button = new ButtonAdv(); 
                button.UseVisualStyle = true; 
                button.Appearance = ButtonAppearance.Metro; 
                button.Size = new Size(80, 80); 
                button.BackgroundImage = this.imageListAdv1.Images[0]; 
                button.MetroColor = Color.White; 
                button.ImageAlign = ContentAlignment.MiddleCenter; 
                this.ImagePanel.Controls.Add(button); 
            } 
 
 
Screenshot: 
 
 
 
Sample: GroupBarExample 
 
Note: 
 
For example, we have used ButtonAdv control to display image view.  
 
Kindly check with above solution and let us know if it is helpful. Otherwise if we have misunderstood your requirement, Can you please share us more details about your requirement  
 
Regards 
Kannan 



KM Kevin McCarty May 10, 2017 01:25 PM UTC

That looks very cool.  I'll give it a try.  Thanks.


VR Venkateshwaran Ramdoss Syncfusion Team May 11, 2017 04:05 AM UTC

Hi Kevin,

We are glad that your issue has been resolved.
Please let us know if you need any other assistance.

Regards,
Venkateshwaran V.R.

Loader.
Up arrow icon