jqplot グラフのタイトルを動的に設定する方法。タイトルを設定した場合: '<b>My chart</b>'
レンダリング後、 My chart'<b>My chart</b>'
であったはずの場所に再び 表示されます。
3454 次
1 に答える
0
var plot2 = $.jqplot('chart2', [[3, 7, 9, 1, 4, 6, 8, 2, 5]], {
// Give the plot a title.
title: '<b>My Chart<b><br>Date From: 07/07/2012 Date To: 07/21/2012',
// You can specify options for all axes on the plot at once with
// the axesDefaults object. Here, we're using a canvas renderer
// to draw the axis label which allows rotated text.
axesDefaults: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
},
// An axes object holds options for all axes.
// Allowable axes are xaxis, x2axis, yaxis, y2axis, y3axis, ...
// Up to 9 y axes are supported.
axes: {
// options for each axis are specified in seperate option objects.
xaxis: {
label: "X Axis",
// Turn off "padding". This will allow data point to lie on the
// edges of the grid. Default padding is 1.2 and will keep all
// points inside the bounds of the grid.
pad: 0
},
yaxis: {
label: "Y Axis"
}
}
});
于 2012-08-09T11:24:31.673 に答える