Skip to content

Commit

Permalink
Merge pull request #17 from highcharts/main
Browse files Browse the repository at this point in the history
add menu capabilities for bar and line
  • Loading branch information
frankelavsky authored Aug 7, 2024
2 parents 7944635 + 896ab7f commit 4231b95
Show file tree
Hide file tree
Showing 4 changed files with 277 additions and 95 deletions.
21 changes: 11 additions & 10 deletions early_explo/examples/menu/barChart.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
barChart = Highcharts.chart('bar-container', {
chart: {
type: 'bar'
type: 'bar',
height: 400
},
title: {
text: 'Energy Sources',
Expand Down Expand Up @@ -49,55 +50,55 @@ barChart = Highcharts.chart('bar-container', {
name: 'Geothermal',
color: "#009c00",
borderColor: "#009c00",
data: [0.21, 0, 0, 0, 0, 0, 0, 0, 0]
data: [0.21, null, null, null, null, null, null, null, null]
},
{
name: 'Solar',
color: "#009c00",
borderColor: "#009c00",
data: [0, 0.77, 0, 0, 0, 0, 0, 0, 0]
data: [null, 0.77, null, null, null, null, null, null, null]
},
{
name: 'Wind',
color: "#009c00",
borderColor: "#009c00",
data: [0, 0, 2.35, 0, 0, 0, 0, 0, 0]
data: [null, null, 2.35, null, null, null, null, null, null]
},
{
name: 'Hydro',
color: "#009c00",
borderColor: "#009c00",
data: [0, 0, 0, 2.76, 0, 0, 0, 0, 0]
data: [null, null, null, 2.76, null, null, null, null, null]
},
{
name: 'Biomass',
color: "#009c00",
borderColor: "#009c00",
data: [0, 0, 0, 0, 4.92, 0, 0, 0, 0]
data: [null, null, null, null, 4.92, null, null, null, null]
},
{
name: 'Nuclear',
color: "#1a8dff",
borderColor: "#1a8dff",
data: [0, 0, 0, 0, 0, 8.42, 0, 0, 0]
data: [null, null, null, null, null, 8.42, null, null, null]
},
{
name: 'Coal',
color: "#989898",
borderColor: "#989898",
data: [0, 0, 0, 0, 0, 0, 13.96, 0, 0]
data: [null, null, null, null, null, null, 13.96, null, null]
},
{
name: 'Natural Gas',
color: "#1a8dff",
borderColor: "#1a8dff",
data: [0, 0, 0, 0, 0, 0, 0, 28.01, 0]
data: [null, null, null, null, null, null, null, 28.01, null]
},
{
name: 'Petroleum',
color: "#989898",
borderColor: "#989898",
data: [0, 0, 0, 0, 0, 0, 0, 0, 36.2]
data: [null, null, null, null, null, null, null, null, 36.2]
},
]
});
13 changes: 8 additions & 5 deletions early_explo/examples/menu/lineChart.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lineChart = Highcharts.chart('line-container', {
chart: {
height: 400
},
title: {
text: 'Monthly Energy Consumption',
align: 'left'
Expand All @@ -8,11 +11,11 @@ lineChart = Highcharts.chart('line-container', {
// align: 'left'
// },

// yAxis: {
// title: {
// text: ''
// }
// },
yAxis: {
title: {
text: ''
}
},

xAxis: {
accessibility: {
Expand Down
Loading

0 comments on commit 4231b95

Please sign in to comment.