This is a migrated thread and some comments may be shown as answers.

How to: Display multiple values within a single series

7 Answers 237 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Ab
Top achievements
Rank 1
Ab asked on 04 Sep 2013, 07:50 PM

We are looking to replicate your Silverlight example using WinForms.RadChartView. We need to be able to display multiple sections (represented by a color) within each bar (in your example - a country)

 

In addition @ run time we need to be able to ... 

  1. Drop new values onto a specific bar (country)  and repopulate the chart to include the new value(s)
  2. Drag an item (represented by a color) from one bar (country) to another  and repopulate the chart to include the new value(s) or remove it altogether.

 

  • Is this possible in WinForms.RadChartView?
    • If yes, can you provide/point us to an example?
    • If not what are our options?

7 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 09 Sep 2013, 02:30 PM
Hi Abhinav,

Thank you for writing.

In order to display the desired "multiple sections" in RadChartView you can use the series CombineMode property. In the following topic you can find out which are the available modes for the property and how to use them: Bar.

As to the other questions at hand, I want to ask you to provide me with a more detailed information perhaps even some screenshots on what exactly your goals are. I am asking you this because by default RadChartView does not have Drag&Drop service, but if we have more comprehensive information on what you are trying to achieve we might be able to provide you with solution.  

Please let me know if there is something else I can help you with.

Regards,
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ab
Top achievements
Rank 1
answered on 09 Sep 2013, 05:12 PM
Hi Dimitar,

Thanks for the info.

To explain briefly:

We want to display the production planned for parts on various machines using a bar chart, The need is to move parts from Machine "A" to Machine "B", in this case machine "B" may be running under-capacity or currently running a single shift, therefore the purpose is to move a part scheduled on one machine to another and visually be able to compare the effects for the change.

There may be 200+ parts stacked on say machine "A", where-as machine "B" may have 10 parts. This situation arises due to many factors which may be features, capability, size etc. 

I hope this (with the help of the attached image) helps explain what we are attempting to achieve. .
0
Dimitar
Telerik team
answered on 12 Sep 2013, 02:00 PM
Hi Abhinav,

Thank you for writing.

I have created and attached a sample project. In the project you may find a sample implementation of the desired behavior. Feel free to use or modify it in any way that is suitable for your case.

Please let me know if there is something else I can help you with.

Regards,
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ab
Top achievements
Rank 1
answered on 13 Sep 2013, 01:26 PM
Perfect! This is what I was looking for ...

Is there a way to specify the color on each datapoint?

Thanks for your help
0
Dimitar
Telerik team
answered on 17 Sep 2013, 04:04 PM
Hello Abhinav,

Thank you for writing back.

You can change the data point color with the following line of code:
this.radChartView1.Series[1].Children[2].BackColor = Color.Red;

But in this case this I will suggest that you set a border for the data points, because when you drop a point it will be cloned and its color will not be preserved. You can find a sample implementation of data points with border along with some improvements in the demo attached.

I hope this helps. Should you have any other questions, I will be glad to assist you.

Regards,
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ab
Top achievements
Rank 1
answered on 18 Sep 2013, 04:36 PM
Thanks for that tip, Dimitar.

How can I control the color (back & fore) of the label (see attached screenshot) it is currently displaying the label fore-color using the back-color I assign to the series. Therefore making the label unreadable!



0
Dimitar
Telerik team
answered on 23 Sep 2013, 12:07 PM
Hi Abhinav,

Thank you for writing back.

You can use the ChartTrackballController instance to change the backcolor of the TrackBall label. For the text color you can use the same instance, but you need to subscribe to the TextNeeded event and change the ForeColor there. This is needed because by default the text is html-like formated and just changing the ForeColor property won't take effect:
ChartTrackballController TrackBar = new ChartTrackballController();
 
TrackBar.Element.BackColor = Color.Red;
radChartView1.Controllers.Add(TrackBar);
TrackBar.TextNeeded +=c_TextNeeded;
 
void c_TextNeeded(object sender, TextNeededEventArgs e)
{
    string result = "";
 
    foreach (var item in e.Points)
    {
        result += item.Series.Name;
        result += " ";
        result += ((CategoricalDataPoint)item.DataPoint).Value;
        result += " ";
    }
    e.Text = result;
    e.Element.ForeColor = Color.DarkBlue;
}

Please let me know if there is something else I can help you with.

Regards,
Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ChartView
Asked by
Ab
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Ab
Top achievements
Rank 1
Share this question
or