Skip to content

Commit

Permalink
Revert Basic charts options
Browse files Browse the repository at this point in the history
  • Loading branch information
asaharn committed Aug 5, 2024
1 parent 632130e commit d34ca89
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions pages/examples/noauth/basiccharts.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,6 @@
}
}

var mycustomExport = (marker) => {alert("Alert! Custom export function called with marker: " + JSON.stringify(marker))};

var defaultMarkers = [[to - 500*1000 , "MarkerTP"],[to - 200*1000 , "MarkerAS"]];

var chartOptionsSwimLane1 = {
theme: 'light',
markers: defaultMarkers,
yExtent: [0.2, 0.8],
yAxisType: 'shared', label: 'Lane 1',
onClick: () => alert("'Lane 1' label/axis clicked"),
onMarkersChange: (marker) => {
if(marker){
mycustomExport(marker);
console.log(JSON.stringify(marker));
} else {
console.log('No markers');
}
}
};

var swimLaneOptions = {
1: { yExtent: [0.2, 0.8], yAxisType: 'shared', label: 'Lane 1', onClick: () => alert("'Lane 1' label/axis clicked") },
2: { yAxisType: 'shared', label: 'Lane 2', onClick: () => alert("'Lane 2' label/axis clicked") },
Expand All @@ -70,7 +50,7 @@
// render the data in a chart
var kustoTrender = new KustoTrender();
var lineChart = new kustoTrender.ux.LineChart(document.getElementById('chart1'));
lineChart.render(data, chartOptionsSwimLane1);
lineChart.render(data, { theme: 'light', swimLaneOptions });

var barChart = new kustoTrender.ux.BarChart(document.getElementById('chart2'));
barChart.render(data, { theme: 'dark', grid: true, tooltip: true, legend: 'compact' });
Expand Down

0 comments on commit d34ca89

Please sign in to comment.