本文整理汇总了TypeScript中jQuery.plot函数的典型用法代码示例。如果您正苦于以下问题:TypeScript plot函数的具体用法?TypeScript plot怎么用?TypeScript plot使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plot函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: callPlot
callPlot(options, incrementRenderCounter) {
try {
this.plot = $.plot(this.elem, this.sortedSeries, options);
if (this.ctrl.renderError) {
delete this.ctrl.error;
delete this.ctrl.inspector;
}
} catch (e) {
console.log('flotcharts error', e);
this.ctrl.error = e.message || 'Render Error';
this.ctrl.renderError = true;
this.ctrl.inspector = { error: e };
}
if (incrementRenderCounter) {
this.ctrl.renderingCompleted();
}
}
开发者ID:CorpGlory,项目名称:grafana,代码行数:18,代码来源:graph.ts
示例2: callPlot
function callPlot(incrementRenderCounter) {
try {
plot = $.plot(elem, sortedSeries, options);
if (ctrl.renderError) {
delete ctrl.error;
delete ctrl.inspector;
}
} catch (e) {
console.log('flotcharts error', e);
ctrl.error = e.message || "Render Error";
ctrl.renderError = true;
ctrl.inspector = {error: e};
}
if (incrementRenderCounter) {
ctrl.renderingCompleted();
}
}
开发者ID:casaria,项目名称:grafana-trillium-src-fork,代码行数:18,代码来源:graph.ts
示例3: addPieChart
function addPieChart() {
var width = elem.width();
var height = elem.height();
var size = Math.min(width, height);
var plotCanvas = $('<div></div>');
var plotCss = {
top: '10px',
margin: 'auto',
position: 'relative',
height: (size - 20) + 'px'
};
plotCanvas.css(plotCss);
var $panelContainer = elem.parents('.panel-container');
var strokecolor = $panelContainer.css('background-color');
var options = {
legend: {
show: false
},
series: {
pie: {
show: true,
stroke: {
color: strokecolor,
width: 0.3
},
label: {
show: ctrl.panel.legend.show && ctrl.panel.legendType === 'On graph'
},
innerRadius: undefined
}
},
grid: {
hoverable: true
}
};
if (panel.pieType === 'donut') {
options.series.pie.innerRadius = 0.5;
}
elem.html(plotCanvas);
$.plot(plotCanvas, ctrl.data, options);
plotCanvas.bind("plothover", function (event, pos, item) {
if (!item) {
$tooltip.detach();
return;
}
var body;
var percent = parseFloat(item.series.percent).toFixed(2);
var formatted = ctrl.formatValue(item.series.data[0][1]);
body = '<div class="graph-tooltip-small"><div class="graph-tooltip-time">';
body += '<div class="graph-tooltip-value">' + item.series.label + ': ' + formatted;
body += " (" + percent + "%)" + '</div>';
body += "</div></div>";
$tooltip.html(body).place_tt(pos.pageX + 20, pos.pageY);
});
}
开发者ID:YuhangGe,项目名称:grafana,代码行数:65,代码来源:rendering.ts
注:本文中的jQuery.plot函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论