小编Sha*_*ggy的帖子

flot条形图xaxis标签与旋转文本-90对齐问题

我正在使用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轴标签对齐到相应的条形图.提前致谢...

html javascript flot

10
推荐指数
2
解决办法
2万
查看次数

具有子网格的jqGrid的全局展开/折叠按钮

我正在使用带子网格配置的jqGRid来显示我的数据.我想有全局展开和折叠按钮来显示或隐藏所有子网格信息.jqGrid库是否以任何方式提供此功能?

jqgrid

3
推荐指数
1
解决办法
4542
查看次数

Flot Pie chart with legend & Pie labels

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?

jquery flot pie-chart

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

flot ×2

html ×1

javascript ×1

jqgrid ×1

jquery ×1

pie-chart ×1