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

[Solved] [Charts]-Plot Bands -- Dynamic "From" and "To" Data point Issue

1 Answer 83 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Narayana
Top achievements
Rank 1
Narayana asked on 06 Jun 2012, 09:23 PM
Hi All,

     I am using the below code snippet from the examples for Plot Bands which is working fine.
      plotBands.Add().Color("#cccccc").From(0).To(12000).Opacity(0.3);

  [Problem]:I could not able to assign the "From" and "To" values based on data point values.
            Ex:From(s=>s.minValue).To(s=>s.maxValue).

            Please advise me on how to set the values for "From" and "To" dynamically 
            based on datapoint values with simple example.

            Waiting for the reply.        
   

1 Answer, 1 is accepted

Sort by
0
achilles
Top achievements
Rank 1
answered on 20 Jun 2012, 06:23 AM
Hi,
I set my Plot-bands dynamically this way ...

    var chart = getChart();

    chart.options.valueAxis.plotBands[0].from = 3;
    chart.options.valueAxis.plotBands[0].to = 6;
    chart.options.valueAxis.plotBands[1].from = 9;
    chart.options.valueAxis.plotBands[1].to = 12;

    chart.options.yAxis[0].plotBands[0].from = 3;
    chart.options.yAxis[0].plotBands[0].to = 6;

Hope this is what you are looking for

Regards

Achilles
Tags
Chart
Asked by
Narayana
Top achievements
Rank 1
Answers by
achilles
Top achievements
Rank 1
Share this question
or