Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.tooltipContainerSelector = '.grouped-bar .metadata-group';
break;
case ChartType.Heatmap:
this.chart = heatmap();
this.chartSelector = '.heatmap';
this.chartClickSelector = '.heatmap .box';
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.Legend:
this.chart = legend();
this.chartSelector = '.britechart-legend';
this.chartClickSelector = '.legend-entry';
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.Line:
this.chart = line();
this.chartSelector = '.line-chart';
this.chartClickSelector = ''; // No click selector.
this.tooltipContainerSelector = '.line-chart .metadata-group .hover-marker';
break;
case ChartType.ScatterPlot:
this.chart = scatterPlot();
this.chartSelector = '.scatter-plot';
this.chartClickSelector = ''; // No click selector.
this.tooltipContainerSelector = '.scatter-plot .metadata-group';
break;
case ChartType.Sparkline:
this.chart = sparkline();
this.chartSelector = '.sparkline';
this.chartClickSelector = ''; // No click selector.
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
this.tooltipContainerSelector = '.grouped-bar .metadata-group';
break;
case ChartType.Heatmap:
this.chart = heatmap();
this.chartSelector = '.heatmap';
this.chartClickSelector = '.heatmap .box';
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.Legend:
this.chart = legend();
this.chartSelector = '.britechart-legend';
this.chartClickSelector = '.legend-entry';
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.Line:
this.chart = line();
this.chartSelector = '.line-chart';
this.chartClickSelector = ''; // No click selector.
this.tooltipContainerSelector = '.line-chart .metadata-group .hover-marker';
break;
case ChartType.ScatterPlot:
this.chart = scatterPlot();
this.chartSelector = '.scatter-plot';
this.chartClickSelector = ''; // No click selector.
this.tooltipContainerSelector = '.scatter-plot .metadata-group';
break;
case ChartType.Sparkline:
this.chart = sparkline();
this.chartSelector = '.sparkline';
this.chartClickSelector = ''; // No click selector.
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
private drawChart() {
let that = this;
this.line = lineChart();
this.chartTooltip = tooltip();
let lineContainer = d3Selection.select(this.el).select('.line-chart-container'),
containerWidth = lineContainer.node() ? lineContainer.node().getBoundingClientRect().width : false;
if (containerWidth) {
this.line.width(containerWidth);
for (let option in this.chartConfig['properties']) {
if (this.line.hasOwnProperty(option) && option !== 'colorSchema') {
this.line[option](this.chartConfig['properties'][option]);
}
}
let showTooltip = false;
if (this.chartConfig.hasOwnProperty('showTooltip') && this.chartConfig['showTooltip'] === true) {
mounted() {
const container = d3Selection.select('.c-work-watchers-chart');
const containerWidth = container.node() ? container.node().getBoundingClientRect().width : false;
const lineMargin = {
top: 15,
bottom: 45,
left: 45,
right: 0,
};
const lineChart = new LineChart();
$.ajax({
method: 'GET',
url: `/api/internal/works/${this.workId}/watchers_chart_data`,
}).done((data) => {
const dataset = {
dataByTopic: [
{
topicName: 'Watchers',
topic: -1,
dates: data,
},
],
};
if (containerWidth) {
LineChartComponent.prototype.drawChart = function () {
var that = this;
this.line = lineChart();
this.chartTooltip = tooltip();
var lineContainer = d3Selection.select(this.el).select('.line-chart-container'), containerWidth = lineContainer.node() ? lineContainer.node().getBoundingClientRect().width : false;
if (containerWidth) {
this.line.width(containerWidth);
for (var option in this.chartConfig['properties']) {
if (this.line.hasOwnProperty(option) && option !== 'colorSchema') {
this.line[option](this.chartConfig['properties'][option]);
}
}
var showTooltip = false;
if (this.chartConfig.hasOwnProperty('showTooltip') && this.chartConfig['showTooltip'] === true) {
showTooltip = true;
this.line.on('customMouseOver', function () {
that.chartTooltip.show();
});
this.line.on('customMouseMove', function (dataPoint, topicColorMap, dataPointXPosition) {
onMounted(() => {
const container = d3Selection.select(".c-work-watchers-chart")
const containerWidth = container.node() ?
container.node().getBoundingClientRect().width
:
false
const lineMargin = {
top: 15,
bottom: 45,
left: 45,
right: 0
}
const lineChart = new LineChart()
$.ajax({
method: 'GET',
url: `/api/internal/works/${props.workId}/watchers_chart_data`
}).done(data => {
const dataset = {
dataByTopic: [
{
topicName: "Watchers",
topic: -1,
dates: data
}
]
}
if (containerWidth) {