// Colors
var color01 = '#00cde2';
var color02 = '#ffb700';
var color03 = '#7ac70c';
var color04 = '#313541';
var color05 = '#fc3232';
var color06 = '#1cb0f6';
var color07 = '#00c07f';
var data = [
{data: [[0, 4.1]], color: color01},
{data: [[1, 1.8]], color: color02},
{data: [[2, 2]], color: color03},
{data: [[3, 4.5]], color: color04},
{data: [[4, 3.7]], color: color05},
{data: [[5, 5.6]], color: color06},
{data: [[6, 2.6]], color: color07}
];
$.plot($("#placeholder"), data, {
series: {
lines: {
fill: false
},
points: {show: false},
bars: {
show: true,
align: 'center',
barWidth: 0.5,
fill: 1,
lineWidth: 1
}
},
xaxis: {
tickLength: 0,
ticks: [
[0, "Data One"],
[1, "Data Two"],
[2, "Data Three"],
[3, "Data Four"],
[4, "Data Five"],
[5, "Data Six"],
[6, "Data Seven"]]
},
yaxis: {
min: 0
},
grid: {
hoverable: true,
backgroundColor: {
colors: ["#fff", "#fff"]
},
borderWidth: {
top: 1,
right: 1,
bottom: 2,
left: 2
},
borderColor: {
top: "#e5e5e5",
right: "#e5e5e5",
bottom: "#a5b2c0",
left: "#a5b2c0"
}
}
});
@import 'https://fonts.googleapis.com/css?family=Open+Sans';
#placeholder{
font-family: 'Open Sans', sans-serif;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://www.flotcharts.org/flot/jquery.flot.js"></script>
<div id="placeholder" style="width:100%; height: 300px"></div>
fill: .75
. I was usingfill: true
and only got 50%. After seeing your answer, I understood the real use offill
, where you specify the opacity. – Limon