我已经在我的项目中实现了一个图表并且运行良好.现在我想在一个特定的动态上添加一个点X-Axis onclick.
这是迄今为止我尝试过的小提琴. 小提琴演示
和代码
plotOptions: {
series: {
cursor: 'ns-resize',
point: {
events: {
drag: function(e) {},
drop: function() {
var y_val = Highcharts.numberFormat(this.y, 2);
var x_val = Highcharts.numberFormat(this.x, 2);
updater(y_val, x_val);
console.log(options.series[1].data);
}
}
},
Run Code Online (Sandbox Code Playgroud)
现在有一种方法可以X-axis在点击上添加一个点.例如,如果我们点击之间10%-20%,那么15%应该在X轴上添加一个点.它也应该附在表格中.
感谢帮助
是否可以使用jqplot制作图形,如下所示?最接近可能的图表是stacked使用该着色以及点标签是一个问题.

这个jsfiddle包含我努力制作这个条形图以及它的图例和点标签.因此可以使它看起来像图像.
var barchart = $.jqplot('chart1', [s1, s2, s3], {
animate: true,
grid: {
background: 'white',
drawBorder:false,
shadow: false
},
seriesColors: ['#73C6E8', '#F28570', '#727272'],
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barPadding: 20,
barWidth: 25,
barMargin:10,
fillToZero: true
},
pointLabels: { show: true }
},
series: [
{ label: 'USA' },
{ label: 'India' },
{ label: 'South Africa' }
],
legend: {
show: true,
placement: 'outsideGrid',
location:'se',
background:'white',
border: 'white',
fontFamily: 'Gotham Medium',
fontSize:'12px',
renderer: $.jqplot.EnhancedLegendRenderer …Run Code Online (Sandbox Code Playgroud) 我有一个不同实体的属性名称,如汽车、人等。根据Id我想要的名称。但我想用一个方法来完成它,该方法接受实体名称并根据该名称给出输出。像这样的东西:
public string GetEntityByName(int id,string entityName)
{
using (var context = new MyContext())
{
return context[entityName].Find(id).Name;
}
}
Run Code Online (Sandbox Code Playgroud) JavaScript 重定向已停止在应用程序和浏览器中的最新版本的 facebook 上运行。尝试了
window.location.replace({url})很多不同的方法,但没有效果。包括:
关于它为什么不起作用的任何建议?
我有一个内部类Web.Properties作为设置类Settings.settings.现在我想在mvc 4的剃刀视图(.cshtml文件)中使用其Settings类的属性
以下代码是设置文件(自动生成)
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class UIMessagesSettings : global::System.Configuration.ApplicationSettingsBase {
private static UIMessagesSettings defaultInstance = ((UIMessagesSettings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new UIMessagesSettings())));
public static UIMessagesSettings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("An error occured while loading grid data.")]
public string GridErrorMsg {
get {
return ((string)(this["GridErrorMsg"]));
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我想在剃刀视图(.cshtml)中使用GridErrorMsg属性我尝试使用以下代码
@Properties.UIMessagesSettings.Default.GetType()
Run Code Online (Sandbox Code Playgroud)
但它说无法访问UIMessagesSettings,因为它是一个内部类.这个问题的解决方案是什么?