<commit_before>/** @jsx React.DOM */
"use strict";

var React = require("react");
var $ = require("jquery");

var ExpressionChart = React.createFactory(require("../components/viz/expression_chart.jsx"));

var expressionView = {};
expressionView.render = function () {
	$.getJSON('/backend/locus/' + locus['id'] + '/expression_details?callback=?', (data) => {
		if (data.datasets.length) {

			// use filter_table(minValue, maxValue) method from expression_details.js
			var _onClick = null;
			if (filter_table) {
				_onClick = (minValue, maxValue) => { filter_table(minValue, maxValue); };
			}

			React.render(
				<ExpressionChart data={data.overview} minValue={data.min_value} maxValue={data.max_value} hasScaleToggler={true} onClick={_onClick} hasHelpIcon={true}/>,
				document.getElementById("j-expression-chart-target")
			);
		} else {
			$("#expression_overview_panel").hide();
        	$("#expression_message").show();
		}
	});
};

module.exports = expressionView;
<commit_msg>fix expression bug<commit_after>/** @jsx React.DOM */
"use strict";

var React = require("react");
var $ = require("jquery");

var ExpressionChart = require("../components/viz/expression_chart.jsx");

var expressionView = {};
expressionView.render = function () {
	$.getJSON('/backend/locus/' + locus['id'] + '/expression_details?callback=?', (data) => {
		if (data.datasets.length) {

			// use filter_table(minValue, maxValue) method from expression_details.js
			var _onClick = null;
			if (filter_table) {
				_onClick = (minValue, maxValue) => { filter_table(minValue, maxValue); };
			}

			React.render(
				<ExpressionChart data={data.overview} minValue={data.min_value} maxValue={data.max_value} hasScaleToggler={true} onClick={_onClick} hasHelpIcon={true}/>,
				document.getElementById("j-expression-chart-target")
			);
		} else {
			$("#expression_overview_panel").hide();
        	$("#expression_message").show();
		}
	});
};

module.exports = expressionView;

{'fraction_non_alphanumeric': 0.17566191446028515, 'fraction_numerical': 0.0, 'mean_word_length': 4.679190751445087, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4315377', 'n_tokens_mistral': 678, 'n_tokens_neox': 621, 'n_words': 108}