Comments (5)
画线范围是相对View区域的,不太理解你的问题
from suitlines.
比如我们自定义了一个VIew。要求适配不同的手机上展示等比例绘制画布上的图。 比如画一条线是长度是10。那么在画布中这个10的单位是用的什么来表示呢? 再一个若使用控件时传入了dp作为单位,是否还要考虑到转换单位再绘制的问题。
from suitlines.
图肯定是适配了的,你也可以参见源码。例如指定了可见点的数量,不论屏幕多大大小,始终是指定的数量,变化的是两个点之间的间距。另外,对外的接口的参数只有xy轴的文字大小的单位需要是sp,其余的不涉及dp或者sp,因此整体来说,不用担心适配问题。
from suitlines.
好的,感谢。照这样理解。是不是除了字体是用了sp,其余的都是px。也就是基于像素来确定单位的?
from suitlines.
是的,不过我建议你可以以具体的某个方法为例咨询。
最后感谢你的提问。
from suitlines.
Related Issues (20)
- 为何没有Y轴自定义区间的方法? HOT 1
- 可以显示在一个屏幕吗?不用拖动才能看到的~ 谢谢~ HOT 1
- 为什么直接设置4条线就会报空指针~ HOT 1
- 不能自动加载多条线段?
- 很棒的view 真是小而美 . x轴坐标文字能否倾斜呢 HOT 1
- 体温
- 绘制多条曲线时 加入第一个曲线有10个点 第二个曲线有12个点 会造成指针下标越界异常 HOT 1
- 你好,请问可以增大点的大小吗? HOT 2
- 有两个问题
- 请问,偶尔会出现横坐标绘制不出来的情况,怎么解决啊?
- 偶尔会出现的闪退请款,是什么原因...求大神看看!! HOT 2
- 在recyclerview中被回收后就出不来了 HOT 1
- Y为负数的时候不会显示 HOT 2
- 在fragment中画多条线会出现控制针,排除生命周期问题,在onresume方法里使用也是空指针 HOT 1
- Implementation in viewPager HOT 1
- x轴第一条数据和第二条数据会贴合,中间的数据正常。y轴没法加单位,比如℃符号。 HOT 1
- 提示信息怎么一直停留在哪里?
- charline更新数据后怎么能清空上次记录后重新绘制
- 显示精度问题 百条数据以上 曲线图会变成阶梯状
- 只有两条数据时,X轴沾满了整个屏幕
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suitlines.