Note that there are some explanatory texts on larger screens.

plurals
  1. POjqPlot, char names for Y-axis Ticks
    text
    copied!<p>This is my first asked-myself question on stackoverflow - a site that has helped me so many times already. Please be understanding :)</p> <p>I have problems with jqPlot that looks really simple, but its seems not to be.</p> <p>I want to give static char names in Y axis (ticks). Y-axis values comes from real height on the Y-axis. I would like to create names like: value 1, value 2, value 3, value 4, value 5... instead of (for example) 1.5, 3.0, 4.5, 7.0, 100.0...</p> <p>Is it possible with jqPlot configuration alone. I could not see option as such, but maybe there is one, and I will feel ashamed :).</p> <p>Thank you in advance for any help.</p> <p>(EDIT) Here is the FULL code I used: </p> <pre><code>var plot2 = $.jqplot('chart2', [line_oczekiwana_srednia, line_sd_plus_1, line_sd_plus_2, line_sd_plus_3, line_sd_plus_4, line_sd_minus_1, line_sd_minus_2, line_sd_minus_3, line_sd_minus_4, line1, line_WEST4, ], { animate: true, title:'OLYMPUS LEVEL 1 0029 : Kontrola biochemii. Typ materiału: Surowica', axes:{ xaxis:{ renderer:$.jqplot.DateAxisRenderer, tickOptions:{ formatString:'%#d-%m-%y %#H:%M', angle: -30, }, tickRenderer:$.jqplot.CanvasAxisTickRenderer, label:'Zakres czasu kontroli', labelOptions:{ fontFamily:'Helvetica', fontSize: '14pt' }, labelRenderer: $.jqplot.CanvasAxisLabelRenderer }, yaxis:{ numberTicks: 9, ticks:[3.6284,3.6863,3.7442,3.8021,3.8600,3.9179,3.9758,4.0337,4.0916], renderer:$.jqplot.LogAxisRenderer, tickOptions:{ showGridline: false, **formatString:'SDx:%.1f',** labelPosition: 'middle', angle:-0, }, tickRenderer:$.jqplot.CanvasAxisTickRenderer, labelRenderer: $.jqplot.CanvasAxisLabelRenderer, labelOptions:{ fontFamily:'Helvetica', fontSize: '14pt' }, label:'Wartości (mmol/l)' }, }, highlighter: { show: true, sizeAdjust: 12.5, }, cursor: { show: true, zoom:true, dblClickReset:true, tooltipLocation:'sw' }, series:[ {lineWidth:1, color: '#76a4e8', showMarker: false}, {lineWidth:1, color: '#d8d8d8', showMarker: false}, {lineWidth:1, color: '#d8d8d8', showMarker: false}, {lineWidth:1, color: '#d8d8d8', showMarker: false}, {lineWidth:1, color: '#d8d8d8', showMarker: false}, {lineWidth:1, color: '#d8d8d8', showMarker: false}, {lineWidth:1, color: '#d8d8d8', showMarker: false}, {lineWidth:1, color: '#d8d8d8', showMarker: false}, {lineWidth:1, color: '#d8d8d8', showMarker: false}, {lineWidth:2, color: '#f4ad31', rendererOptions: {animation: {speed: 1500}}, markerOptions:{color: 'gray', style:'filledSquare'}}, {showLine: false, color: 'red', markerOptions:{color: 'red', style:'filledSquare'}}, ], legend:{ renderer: jQuery.jqplot.EnhancedLegendRenderer, show: true, hideZeros: true, location: 'se', labels: ['Oczekiwana średnia (3.8600)', 'SD+1 (3.9179)', 'SD+2 (3.9758)', 'SD+3 (4.0337)', 'SD+4 (4.0916)', 'SD-1 (3.8021)', 'SD-2 (3.7442)', 'SD-3 (3.6863)', 'SD-4 (3.6284)', 'Wyniki kontroli (3.6284)', 'Reguła WEST4', ] } }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload