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

Opacity for the chart

2 Answers 23 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Nils C.
Top achievements
Rank 1
Nils C. asked on 17 Jul 2014, 07:02 AM
Hi,

we are using the Radhtml Chart with Series Type Area. In your demos, you got an opacity, so even areas which lay above each other are visible. i tried to apply opactity too, but it's not possible. 

This is my code:

               columnSeries = New AreaSeries
                columnSeriesByRowName.Add(rowName, columnSeries)
                columnSeries.Name = rowName
                columnSeries.LineAppearance.LineStyle = HtmlChart.Enums.ExtendedLineStyle.Step
                Dim colorVal = ColorTranslator.FromHtml(colors(numberOfSeries Mod 13))
                columnSeries.Appearance.FillStyle.BackgroundColor = Color.FromArgb(50, colorVal)
                columnSeries.LabelsAppearance.TextStyle.Color = Color.DarkGray

What do i have to change?

Thanks for advice.


2 Answers, 1 is accepted

Sort by
0
Nils C.
Top achievements
Rank 1
answered on 17 Jul 2014, 07:18 AM
Found the solution myself:


function pageLoad() {
    opacity();
}


    function opacity() {
            var chart = $find("<%=RadHtmlChart1.ClientID%>");
         


            for (var i = 0; i <= chart._chartObject.options.series.length-1; i++) {
                chart._chartObject.options.series[i].opacity = 0.3;
            }


            chart.repaint();


        }
0
Danail Vasilev
Telerik team
answered on 17 Jul 2014, 08:13 AM
Hi Nils,

You may also find useful this feedback item that sheds more light on the matter.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart (HTML5)
Asked by
Nils C.
Top achievements
Rank 1
Answers by
Nils C.
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or