score:0
Accepted answer
There are a few approaches you could use:
Using the opacity the way it is
1.1. Keep
fillOpacity
, but vary the# of elements
:Keeping the
fillOpacity: 0.01
:How many elements it is necessary to get a resultant
0.99
opacity?
function calculateTimes(opacity, overlappingOpacity) { var times = 1; var currentOpacity = opacity; while (currentOpacity < overlappingOpacity) { currentOpacity += (1 - currentOpacity) * opacity; times++; } return times; } calculateTimes(0.01, 0.99); //Gives you 459 elements
1.2. Keep the
# of elements
, but varyfillOpacity
Keeping the 100 elements:
How much should
fillOpacity
be set to get a resultant0.99
opacity?
function calculateOverlappedOpacity(opacity, times) { return times == 1 ? opacity : opacity + (1 - opacity) * calculateOverlappedOpacity(opacity, times - 1); } function calculateOpacityFor(resultantOpacity, times) { for (var i = 0.0001; i <= 1; i += 0.0001) { if (calculateOverlappedOpacity(i, times) >= resultantOpacity) { return i; } } return 1; } calculateOpacityFor(0.99, 100) //Gives you a fillOpacity of 0.0451
Using the opacity the way you thought it worked
Use 1 element set with a desired
fillOpacity
based on the element quantity:How much should the resultant opacity be (based on the quantity of elements)?
0.01 * chartData.length
Source: stackoverflow.com
Related Query
- highcharts opacity when "bubbles" are stacked
- stacked bar chart shows hanging zeros when all values are 0 highcharts
- Highcharts - null values are plotted on stacked area chart, in latest version
- Adding round corners to Highcharts Bar Chart with stacked bars when value is 0
- Highcharts stacked column stackLabels do not show when axis is reversed
- highcharts stacked column overlaps when toggling the legends visibility
- Highcharts - prevent large marker from overflowing axes - my bubbles are escaping =(
- Highcharts - how to do a responsive pie chart when the texts of the labels are long
- Highcharts won't draw line when series values are all 0
- Fire a bootstrap modal when i click on a stacked bar of highcharts
- Highcharts not showing value when two stacked columns have value = 1
- remove gap below highcharts area chart when all values are zero
- Highcharts legends are overlapping when i change language to arabic
- Highcharts stacked column: show total when a stack is hidden
- How to show values in Highcharts tooltip other than x and y when data points are too high?
- Highcharts - Add Axys properties when series are added later to Plot
- Hide columns on Stacked Bar when all values are 0
- How do you change the height value when more items are added to highcharts dynamically?
- Highcharts : Stacked barchart on hover change the opacity
- How can I put xAxis in highcharts starting in the horizontal line when all values are in 0?
- Highcharts Boxplot - box with lower, upper quartile and median is not displaying when min and max are null of a category
- Highcharts displaying white space for bars when all values are zero
- Highcharts cloud issue with data source when duplicating chart
- Decimals on yAxis are not being displayed, even if that same code works on highcharts jsfiddle
- Highcharts columns are thin when 10+ series displayed
- Highcharts - Change opacity of chart when tooltip is shown
- HighCharts stacked column chart : 'plotOptions.series.stacking' are incompatible types
- Highcharts not redrawing when series are updated inside subscribe callback
- How to update the HighCharts title using drill-up when there are multiple charts on same page?
- HighCharts - When I download csv, can I switch data source to new one?
More Query from same tag
- Remove weekends from highcharts
- highchart stacked bar plotting data doesn't work by javascript
- Highchart gauge not displaying min/max value in Vue.js
- Formatting dataLabels in Highcharts
- HighCharts specifying min, max and tickInterval not giving expected results
- How to force HighChart xAxis units to show custom format in all zoom levels?
- How to tell Highcharts to set date on the x axis, and use a range of time (like 1 day)
- Need help in binding dynamic JSON to Highcharts
- Highcharts Heatmap Legend Max
- *Highchart* Color of chart change when downloading two time continuously
- How to reduce height of cell in highcharts
- Highlight weekend with a plot band or a zone
- How can I create a specific Json output for use with Highcharts?
- How to zoom chart line same as legend hover and reset automatically on button click in highcharts?
- Highchart area range on a plot column
- How do get highcharts combo column scatter to work?
- Showing all values on one point on x axis and changing range for rCharts highcharts
- How to fetch JSON data from HTML DIV on same page for Highcharts?
- highcharts canvas-tools: Cannot read property 'prototype' of undefined
- Highcahrts Error,Uncaught TypeError:Cannot read property 'destroy' of undefined
- Highcharts: X axis, MySQL datetime
- HighCharts : Highlight entire series when hover and restore state when out
- Plotting the below json in a HighChart
- Highcharts diffent color @ Temperature Line
- highchart save image using exporting java and phantomjs
- How to call a function after Highchart animation complete In Anguler?
- Two y Axis in Highcharter in R
- ticks not showing as entered
- High charts displays data only if we press F12 (developer tool) in chrome browser
- Select custom date range on highstock control