Last active
December 25, 2019 20:51
-
-
Save Mohamedemad4/95883d11d5897d5e5d540dd3618e3644 to your computer and use it in GitHub Desktop.
// source https://jsbin.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style id="jsbin-css"> | |
@import url(https://fonts.googleapis.com/css?family=Roboto); | |
body { | |
font-family: Roboto, sans-serif; | |
} | |
#chart { | |
max-width: 650px; | |
margin: 35px auto; | |
} | |
</style> | |
<div id="chart"> | |
</div> | |
<script id="jsbin-javascript"> | |
var options = { | |
chart: { | |
type: 'area' | |
},series: [{ | |
data: [[1, 34], [3, 54], [5, 23] , [15, 43]] | |
}], | |
fill: { | |
type: 'solid' , | |
colors: [ | |
function( value, seriesIndex, w ) { | |
console.log(value); | |
if (value < 15) { | |
return '#7E36AF'; | |
} else { | |
return '#D9534F'; | |
} | |
} | |
] | |
}} | |
var chart = new ApexCharts(document.querySelector("#chart"), options); | |
chart.render(); | |
</script> | |
<script id="jsbin-source-css" type="text/css">@import url(https://fonts.googleapis.com/css?family=Roboto); | |
body { | |
font-family: Roboto, sans-serif; | |
} | |
#chart { | |
max-width: 650px; | |
margin: 35px auto; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var options = { | |
chart: { | |
type: 'area' | |
},series: [{ | |
data: [[1, 34], [3, 54], [5, 23] , [15, 43]] | |
}], | |
fill: { | |
type: 'solid' , | |
colors: [ | |
function( value, seriesIndex, w ) { | |
console.log(value); | |
if (value < 15) { | |
return '#7E36AF'; | |
} else { | |
return '#D9534F'; | |
} | |
} | |
] | |
}} | |
var chart = new ApexCharts(document.querySelector("#chart"), options); | |
chart.render();</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(https://fonts.googleapis.com/css?family=Roboto); | |
body { | |
font-family: Roboto, sans-serif; | |
} | |
#chart { | |
max-width: 650px; | |
margin: 35px auto; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = { | |
chart: { | |
type: 'area' | |
},series: [{ | |
data: [[1, 34], [3, 54], [5, 23] , [15, 43]] | |
}], | |
fill: { | |
type: 'solid' , | |
colors: [ | |
function( value, seriesIndex, w ) { | |
console.log(value); | |
if (value < 15) { | |
return '#7E36AF'; | |
} else { | |
return '#D9534F'; | |
} | |
} | |
] | |
}} | |
var chart = new ApexCharts(document.querySelector("#chart"), options); | |
chart.render(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment