我正在使用flot库来设计堆积条形图,其中我使用以下js文件.
<script src="@Url.Content("~/Scripts/charts/excanvas.js")"></script>
<script src="@Url.Content("~/Scripts/charts/jquery.flot.js")"></script>
<script src="@Url.Content("~/Scripts/charts/jquery.flot.symbol.js")"></script>
Run Code Online (Sandbox Code Playgroud)
使用以下脚本,我将旋转的xaxis标签文本定义为-90度的条形图.
$.each(data, function (index, item) {
i = (index + 1) * 2;
DataValues.push({ data: [i, item.Value], color: Color[i] });
DataValues.push([i, item.Value]);
TickData.push([i, item.MonthName]);
});
$.plot($("#CurrentYearlyTrendsBar"), [{ data: DataValues, color: "#3D69AA" }],
{
series: { bars: { show: true } },
bars: {
barWidth: 1.5,
align: "center"
},
xaxis: {
ticks: TickData,
axisLabelUseCanvas: true,
labelAngle: -90,
},
yaxis: { axisLabelUseCanvas: true },
grid: { hoverable: true }
});
$("#CurrentYearlyTrendsBar").UseTooltip();
Run Code Online (Sandbox Code Playgroud)
我遇到的问题是xaxis标签的定位.xaxis标签位于图表中相应条形的左边缘.
请建议我如何将x轴标签对齐到相应的条形图.提前致谢...
我正在使用带子网格配置的jqGRid来显示我的数据.我想有全局展开和折叠按钮来显示或隐藏所有子网格信息.jqGrid库是否以任何方式提供此功能?
I am using flot library to draw pie chart. I want to draw pie chart having combination of legend & pie labels. Wherein pie labels will only display slice percentage & corresponding label information from data series will be displayed in legend. Is this combination possible using flot charts?