问题标签 [highcharts-ng]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
266 浏览

javascript - highchart-ng 更新栏上的颜色

我想使用 highchart-ng 在柱形图中动态更改条形图的颜色。我看到每次 $interval 更改颜色时都会触发 highchart-ng 中的 $watch 函数,但是即使每次调用 chart.redraw() 也不会更新颜色。

但是,如果我同时动态添加一个新栏(请参阅 jsfiddle 中的注释代码),该栏会改变颜色。

jsfiddle.net/rick822/k7pbwch4/

0 投票
0 回答
289 浏览

highcharts - 每次重绘时,Highstock 图形颜色都会发生变化

我正在使用带有 ajax 调用的 highstock 来更新每次缩放的数据。在每次缩放期间,图表数据都会通过 API 调用进行更新。在每次重绘时,线条颜色都会随机更改。我怎样才能避免这种情况?

放大 1 放大 2放大 1 放大 2

请注意,我使用的是 angularjs。

JS:

0 投票
1 回答
99 浏览

javascript - 如何更改图表中列的颜色?

我正在使用 highchart 库制作一个 skacked 柱形图。我们可以改变图表的颜色吗..?有三色显示(蓝色,黑色,绿色)..有没有办法改变默认颜色,如(黄色,粉红色,红色)

我需要更改列的颜色吗?

小提琴 http://jsfiddle.net/cr91t8wj/

0 投票
1 回答
3231 浏览

angularjs - 如何为系列添加 highcharts-ng 饼图自定义颜色?

这是我的图表对象。

在这里,我需要为 foo、bar、baz 分隔用户定义的颜色。如何在角度的 highchart-ng 中做到这一点。

0 投票
1 回答
34 浏览

javascript - 在 Highcharts 中自定义图像和不同的文本

我是新来的highcarts主题。我有一条消息,上面写着“标签”和所有类别的数字。我需要自定义单个图像或文本。我怎样才能做到这一点?

我有这个代码:

http://jsfiddle.net/u3o416xb/

0 投票
2 回答
1487 浏览

javascript - keep fixed size of the bars in Highcharts

I want to maintain the same size of the bars. no matter how many there are values. here is the size I want to have all bars.enter image description here

when added four values the bars become smaller. enter image description here

I want all the bars are the same size. no matter that I have to scroll to see the other bars (this is what I want).

this is my code: http://jsfiddle.net/Laxfsbtb/

#xA;
0 投票
2 回答
3596 浏览

javascript - 如何在Angularjs中将值从服务传递到控制器

我正在使用Angular Dashboard Framework制作一个小部件,但我被困在如何将服务中生成的数据值传递给控制器​​?我想将var new_x的值传递给控制器​​——它是在函数 showInfo 中生成的。但是将其添加到控制器时出现以下错误:

我的代码是:

Chart.js 以防万一:

0 投票
2 回答
274 浏览

javascript - put a text in all categories in Highcharts

took a long time with this same question, then I appreciate too if I can help.

I researched a lot and understand that by this method that I have in my code will not run. then I can make it work, how I can do? I have tried many things. I do not understand how to adapt a render text or so ago all of my series.

I want to set the VALUE to RIGHT of the bar, and the value of the SERIES (in my case bar1, bar2, bar3) that are always at the LEFT of the bar. as it is in the picture.

enter image description here

this is my code:

http://jsfiddle.net/pb1q9wzk/

UPDATE

when it is less than 30, so it appears. enter image description here

when it is less than 30, "bar" and the value must be outside of the bar. enter image description here

and when the value is 0, I want to be displayed to the right of "bar".

enter image description here

I appreciate the help, very little css and this library. I still can not get used.

0 投票
1 回答
94 浏览

javascript - 添加一个吧 Highcharts 系列

我想将另一个栏添加到类别中。例如,我想在类别 1 中放置另一个栏以保持我的结构。但我正在添加没有数组的数据。例如,我不想使用这种结构。

我必须使用这个:

在此处输入图像描述

我这样做是因为我想自定义每个栏的名称。但我不知道如何将另一个栏放在与图片所示相同的类别中这是我的文件...

http://jsfiddle.net/v51dxpLn/

在此处输入图像描述

我希望每个栏都被分配一个不同的名称,并且可以将其放在同一类别中。就我的考试而言,我只能按类别划分一个栏。我需要在每个类别的一个栏中放置 n 个栏,但仍保留其不同的名称。

0 投票
2 回答
91 浏览

javascript - 为 Highcharts 中的每个条形添加不同的名称

如何重命名每个栏,我想要不同的名称。总是出现“bar1”、“bar2”等。这是系列的名称。但我希望它出现在那些我想自定义的文本的位置。这就是我所做的。输入不同的名称,如果有 9 个条,我想给条分配不同的名称,bar1、bar2、bar3、Bar4、Bar5、Bar6、Bar7、Bar8、Bar9。我不想在我的例子中重复。

在此处输入图像描述

http://jsfiddle.net/05L1n3wb/