Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tfjs-vis/src/render/barchart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ export async function barchart(
}
},
'data': {'values': values, 'name': 'values'},
'mark': 'bar',
'mark': {
'type': 'bar',
'tooltip': true,
},
'encoding': {
'x': {'field': 'index', 'type': xType, 'axis': xAxis},
'y': {'field': 'value', 'type': yType, 'axis': yAxis}
Expand All @@ -124,8 +127,8 @@ const defaultOpts = {
fontSize: 11,
};

// We keep a map of containers to chart instances in order to reuse the instance
// where possible.
// We keep a map of containers to chart instances in order to reuse the
// instance where possible.
const instances: Map<HTMLElement, InstanceInfo> =
new Map<HTMLElement, InstanceInfo>();

Expand Down
5 changes: 4 additions & 1 deletion tfjs-vis/src/render/histogram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ export async function histogram(
'resize': true,
},
'data': {'values': filtered},
'mark': 'bar',
'mark': {
'type': 'bar',
'tooltip': true,
},
'config': {
'axis': {
'labelFontSize': options.fontSize,
Expand Down