- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
默认情况下,当我的 jvectormap 中有负值时,它将国家/地区着色为黑色(检查国家/地区元素时我看到以下“填充”值:#000NaN)。我想改变这种颜色。我该怎么做?
编辑:这很老套,但我通过循环国家和检查黑色来更新黑色的国家颜色。代码如下:
try {
map = elVectorMap.vectorMap('get', 'mapObject');
map.series.regions[0].setValues(data);
} catch (e) {
var vectorMapOptions = {
map: 'world_mill_en',
backgroundColor: '#ffffff',
regionStyle: {
initial: {
fill: '#aac5e1'
}
},
series: {
regions: [{
values: data,
scale: ['#aac5e1', '#0e569f'],
normalizeFunction: 'polynomial'
}]
}
};
elVectorMap.vectorMap(vectorMapOptions);
}
// Change the color of negative value countries from black to red
elVectorMap.find('.jvectormap-element[fill="#000NaN"]').each(function(){
$(this).css('fill', '#ffcfcd');
});
最佳答案
使用此归一化函数代替“多项式”或“线性”值
normalizeFunction: function(value) {
if (value < 0)
return - Math.pow(Math.abs(value), 0.2)
return Math.pow(value, 0.2);
},
关于css - 更改 jvectormap 负值颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29495649/
我有一个带有标志属性的枚举,我用它来表示权限。我用它来比较 if (CurrentPermissions & Permission1 == Permission1) 等... [FlagsAttrib
我在使用具有两个不同日期的 TIMEDIFF 时遇到问题。以下查询“应该”返回00:04:51 mysql> SELECT TIMEDIFF(TIME('2013-07-21 00:04:50'),T
我有一个页面抛出 JavaScript 异常: Unhandled exception at line 5144, column 13 in raphael.js0x80048270 - JavaSc
我有一个大整数,比如说 BigInteger a=Biginteger.valueOf(50); 除此之外 BigInteger a=(BigInteger.ZERO).subtract(BigInt
我正在使用 CoreLocation 框架获取我的速度和距离来计算平均速度。 在 CoreLocation 发出的第一个更新中,它显示了速度和行进距离的负值。我该如何解决这个问题? 速度是 locat
我有一个数据框“df”: x y 0 1 -1 1 -2 -3 2 3 4 3 4 5 4 9 6 我正在尝试确定 x 和 y 值的百分比是正数还是负数。所
引用自:http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html 'd' '\u0054' Formats the a
这个问题在这里已经有了答案: 关闭 10 年前。 Possible Duplicate: Negative ASCII value int main() { char b = 8-'3';
发现了一个令人费解的指标——事件消息计数为负值。我已确认 ServiceBus Explorer (v3.0.4) 和 Azure 门户报告相同的负值。 怎么会发生这种事? 我为 SB 队列启用了以下
我正在尝试编译一个很大程度上依赖于 libcurl 和 pcap 的自定义包,在我的机器上它工作得很好,但是当我尝试使用工具链编译它时,我收到此错误: $ /home/kavastudios/site
我正在开发一个桌面软件,它向用户每次执行主要操作收费。例如,每个 PDF 打印将向用户收取 0.1 美元的费用。 我的软件提供多线程。 . 所以,如果它运行单线程,它就可以正常工作:) 但问题是如果用
我有一个用户模型和一个工作场所模型。用户有一个字段性别(男/女),每个工作场所有很多用户。我想要选择工作场所的用户总数以及按工作场所名称分组的工作场所的女性用户总数。 这是我尝试过的。 User.se
我正在尝试在 D3 中创建一个复制 this design 的条形图.这个想法是值的范围可以从 -100 到 100 并且彼此并排显示。比例必须保持在 0-100,并使用颜色来指示数字是高于还是低于
我在使用 gcc4.4 的 Ubuntu 10.04 中遇到同样的问题,相同的代码有效使用 gcc4.1 在 RH 5.5 上很好 #include #include int main(int a
size_t 被声明为 unsigned int 所以它不能表示负值。 所以有 ssize_t 这是signed 类型的 size_t 对吗? 这是我的问题: #include #include
我正在尝试确定 x 列对于这些列中的值是否具有相同的方向(正或负)或者它们是否具有不同的方向(例如,一个为正,另一个为负)。 我目前正在使用 with确定列中的值是否为 > 0 , 0 & coun
我的 Firebird 过程采用了几个具有 bigint 值的参数。 当我从 uint64 类型的 go 程序参数调用此过程时,值大于 max int32/2 存储为负数。 如何将 bigint/ui
我正在考虑是否可以消除编译器警告。警告来自将 uint32 与 -1 进行比较。 现在只看一眼,这似乎是一件不明智的事情,因为 uint32 永远不应该为负,但我没有编写这段代码,也不熟悉 c++ 的
我有以下数据框(由负数和正数组成): df.head() Out[39]: Prices 0 -445.0 1 -2058.0 2 -954.0 3 -520.0 4 -73
我正在尝试使用库WPF Metro UI Charts,它派生自Modern UI Charts。但是,当我尝试在 Page 而不是 Window 中使用图表时,我遇到了 ClusteredColum
我是一名优秀的程序员,十分优秀!