1. 第二种方法: put in Extension Points
Arg:plot_add
Value:
function() { var panel = new pv.Panel() .zOrder(999) .def('b0', function() { var ccc = this.getContext(); var scale = ccc.chart.axes.ortho.scale; var li = ccc.panel._layoutInfo; return li.paddings.bottom + scale(y_value); }); panel.add(pv.Rule) .strokeStyle('#3D80FF') .lineWidth(3) .left(0) .bottom(function() { return this.parent.b0(); }) .width (function() { return this.parent.width(); }) .height(null); return panel; }
2. 第二种方法: put in PreExecution
function f() { // Where to draw the horizontal line var y_value = 100; // Contains options that were specified in // the CDE properties tool window, already translated. var cccOptions = this.chartDefinition; // Beware that extension points require special treatment // (these are not yet translated to CCC options format) var eps = Dashboards.propertiesArrayToObject(cccOptions.extensionPoints); eps.plot_add = function() { var panel = new pv.Panel() .zOrder(999) .def('b0', function() { var ccc = this.getContext(); var scale = ccc.chart.axes.ortho.scale; var li = ccc.panel._layoutInfo; return li.paddings.bottom + scale(y_value); }); panel.add(pv.Rule) .strokeStyle('#3D80FF') .lineWidth(3) .left(0) .bottom(function() { return this.parent.b0(); }) .width (function() { return this.parent.width(); }) .height(null); return panel; }; // Convert them to original CDE format: cccOptions.extensionPoints = Dashboards.objectToPropertiesArray(eps); }
req
function f() { // Where to draw the horizontal line var y_value = 100; // Contains options that were specified in // the CDE properties tool window, already translated. var cccOptions = this.chartDefinition; // Beware that extension points require special treatment // (these are not yet translated to CCC options format) // var eps = Dashboards.propertiesArrayToObject(cccOptions.extensionPoints); add_line = ['plot_add', function() { var panel = new pv.Panel() .zOrder(999) .def('b0', function() { var ccc = this.getContext(); var scale = ccc.chart.axes.ortho.scale; var li = ccc.panel._layoutInfo; return li.paddings.bottom + scale(y_value); }); panel.add(pv.Rule) .strokeStyle('#3D80FF') .lineWidth(3) .left(0) .bottom(function() { return this.parent.b0(); }) .width (function() { return this.parent.width(); }) .height(null); return panel; }]; cccOptions.extensionPoints.push(add_line); // Convert them to original CDE format: cccOptions.extensionPoints; }
这样就能添加一条水平线
...
相关推荐
Drawing horizontal and vertical gridlines画水平和竖直的网格线(9KB)
Growth and Doping Modeling of SiC-CVD in a Horizontal (1)
Taking the pain out of adding a horizontal scrollbar to a listbox.给列表框添加水平滚动条
horizontal line times and do not place a constraint on performance. (HDMI requires at least two line times in each vertical blanking interval.) The minimum horizontal blanking time depends on the ...
Can be used for a variety of uses, directions of a particular object at different times, addition to the graph, etc. []() Vertical and horizontal step line indicator. Setup Add it in your root ...
a most probable parse graph on-the-fly as the output interpretation and this parse graph is a subgraph of the And–Or graph after * Song-Chun Zhu is also affiliated with the Lotus Hill Research ...
+ Drawing of data points on a graph is internally clipped if it is outside of the graphing window. This allows for faster graph drawing if many points are outside of the graph pane. + A separate ...
matlab作业1题目 Introduction to MATLAB This homework is designed to teach you to think in terms of matrices and vectors because this is how MATLAB organizes data. You will find that complicated ...
Drawing a horizontal rectangle. horizonal_rectangle.py Drawing a vertical rectangle. horizonal_rectangle.py Drawing random rectangles. random_rectangles.py Drawing coloured rectangles. coloured_...
水平管中气液流动的流动模式图, 气液两相流方面的研究
Implementation of road horizontal alignment as a whole for CAD.pdf
Other New Features in V7.0 - Additional new features in V7.0 include Pair Bar Helper, Horizontal Box Plot Helper, Threshold Line Helper Add-on, Global Font Add-on, Stacked Pareto Helper and Circular ...
Horizontalscroll自定义编辑横向滑动的位置
The authors present a model and a language that allow to define user preferences on schema elements. User preferences are expressed by means of weights associated with schema elements and they express...
config.widget_types.register(Pageflow::HorizontalNavigationBar.widget_type) end 包括javascript和样式表: # app/assets/javascripts/pageflow/application.js //= require pageflow/horizontal_navigation_...
this code is for vertical horizontal line detection.
$ npm install --save bar-horizontal 用法 var barHorizontal = require ( 'bar-horizontal' ) ; barHorizontal ( [ 6 , 5 , 4 , 3 , 2 ] ) ; // => Prints this on the console :- : ▇▇▇▇▇▇▇▇▇▇▇▇▇...
The Ribbon bar Application ("main") Button can display a text label instead of icon in the "scenic" mode (usually "File" in English language UI). The following new methods were added to the ...
Android-Horizontal-Calendar.zip,基于recyclerview的android材料水平日历视图,安卓系统是谷歌在2008年设计和制造的。操作系统主要写在爪哇,C和C 的核心组件。它是在linux内核之上构建的,具有安全性优势。
We study through electromagnetic modeling the absorption of light of a given wavelength in an array of horizontal InP nanowires of diameter less than 100 nm. Such absorption is performed most ...