问题标签 [shinobi]

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 投票
1 回答
569 浏览

ios - Shinobi Charts iOS - 按代码旋转饼图

我在图表本身之外显示饼图和绘制标签。有时我必须显示奇数数据,即一个点占据图表的 90%,所以其余的必须“混搭”到图表的剩余 10%。一切都很好,但标签(切片名称)也在“混搭”。所以我实现了“整理”这些标签不相互碰撞的机制。现在我的图表上方有一个“词云”,因为最大的部分总是朝下,而所有其他部分都朝上。那是我的问题:我想旋转图表,使最大值数据点朝左(让我在图表的右侧放置标签)。

所以我的问题是:
我如何通过代码围绕其中心旋转饼图?

并且旋转整个图表视图不是一种选择,因为标签必须保持水平。

0 投票
1 回答
301 浏览

android - Shinobi Chart Android 改变刻度标签

我有一个要求,我需要更改轴的刻度标签,以便在 Android 上的 Shinobi Chart 上显示轴上的附加信息。

我知道在 iOS 上我们可以使用 -(void)sChart:(ShinobiChart *)chart alterTickMark:(SChartTickMark *)tickMark beforeAddingToAxis:(SChartAxis *)axis 委托方法来做同样的事情。

我想知道是否有任何类似的 api 可以在 Android 上做同样的事情。

0 投票
2 回答
296 浏览

android - 尝试将烛台系列添加到 Xamarin.Android 中的 shinobiCharts

我是 Xamarin 的新手,我正在尝试在 Xamarin.Android 中使用 ShinobiCharts 来显示烛台数据。来自 .axml 的代码:

这是应该显示图表的片段。

这是创建 ShinobiCharts 的代码。问题是图表中未显示添加的系列。风格变了,但没有系列。我做错了什么?我希望任何人都可以提供帮助。

0 投票
1 回答
313 浏览

objective-c - ShinobiCharts x 轴标签在缩小时折叠

我使用 ShinobiCharts 线型类型,我的 x 值是日期字符串,y 是值 - 长整数。

字符点显示正确,但 x 值标签沿整个图表点显示,并显示在彼此的顶部x 标签覆盖

这是我正在使用的图表初始化:

这就是我创建数据点的方式:

任何想法我错过了什么?

0 投票
1 回答
319 浏览

objective-c - Shinobi Chsrts网格线自定义线数

我尝试使用 Shinobi Charts 为我的图表创建网格线,我可以看到轴的线条数量取决于为轴显示的刻度数。

我正在使用此代码来定义网格线:

有没有办法设置所需的网格线数量?

0 投票
1 回答
630 浏览

android - 带有 Shinobi Charts 的 Android Studio 0.8.0

我正在尝试在 android studio 0.8.0 上为 shinobi 图表发布的示例代码,来自

https://github.com/ShinobiControls/shinobicharts-with-android-studio

我尝试将 shinobicharts jar 作为 .jar 库导入。它编译得很好,但我一直收到运行时错误,我不知道该怎么做。这是显示的错误,应用程序永远不会打开,只是从这个崩溃开始

0 投票
1 回答
506 浏览

ios - How to create a Chart Annotation that covers the y-axis for the Shinobi iOS SDK?

I would like to create a Chart Annotation that covers the y-axis like is shown in the image below. The view containing "160.86" is the one I'm trying to mimic. Is this possible with SChartAnnotations provided by Shinobi?

Currently the annotation I'm using gets hidden behind the y-axis labels as it nears the edge of the chart plot area.

enter image description here

0 投票
1 回答
224 浏览

ios - ScatterSeries 中的 ShinobiChart 多点选择

对于我的图表实现,我希望用户能够选择他们认为合适的任意数据点。The issue is that it seems like whenever another data point is selected, the previous one gets deselected. 唯一可行的方法是将所选BOOL对象作为我的数据源对象的一部分,然后在每次选择时在图表上调用reloadData和。redrawChart

然后dataPointAtIndex将处理它。

但这似乎是一种浪费,效率较低的做事方式,而且这没有在选择之间保持放大的好处。

0 投票
1 回答
303 浏览

ios - 如何使用 Shinobi iOS SDK 为条形图填充垂直渐变?

Shinobi 目前支持条形图 (SChartColumnSeries) 的水平渐变。有没有办法用垂直渐变填充?如此处所示:

在此处输入图像描述

0 投票
1 回答
471 浏览

android - BarSeries linewidth ignored on Shinobi

I'm trying to set the width of the bars of a BarSeries with Shinobi. Code's following:

What happens is that the line css1.setLineWidth(180.0f); is completely ignored. I can put 1.0f or 1000.0f and the lines are always the same width no matter what.

What am I missing, or doing wrong? I'm using shinobi 1.5.1.


Edit: same goes with ColumnSeries:

1f or 20f, nothing changes. chart.addSeries(cs);


Edit: following Kai's answer.

I tried playing around with setInterSeriesPadding, but it doesn't do what I need in that if I approach 1.f as padding value the bar will shrink, but if I set 0f the bar will have a minimum height and the space between them will remain 'big'.

To be clearer: I have 4 bars at 0 to 4 on the Y axis with different X values. Each one is centered more or less on the Y value (not really, but not important right now). E.g. bar centered in 2 will go from ~1.8 to ~2.2 and bar centered in 3 will go from ~2.8 to to ~3.2. I want them thicker, so that they go from ~1.55 to ~2.45 and from ~2.55 to ~3.45. How do I do that?


Edit 2 (images):

Actual:

actual result

Desired (sorry for my lack of Paint skills, it was just a way to show that I want them thicker): desired result