jqplot

Primefaces & jqplot - Displaying dates on an axis

偶尔善良 提交于 2019-12-19 09:19:09
问题 I am trying to use the extender atttribute on a line chart in PrimeFaces 3.4. I need to use extender to format the x-axis with date/time values. Doing this without extender is not an option as there are too many data points and the labels simply overwrite if I use the default PF lineChart attributes. When I setup the the code as shown below, I get an x-axis with no values displayed; all I can see is the x-axis. See pic for more details. How can I set this up so that the x-axis displays time

jqplot - Individual values, not totals in stacked chart

我是研究僧i 提交于 2019-12-18 13:24:31
问题 In a stacked bar chart we can show total of each series in every stack, like this However I want value of each series to be shown, not total like this(please ignore the fact that the two samples have different number of series) Additionally I would like to show the total of the stack at the top. What i mean is that, f you look at the first graph, in the first bar, values are 5,15(5+10),24(15+9). My desired result should be like the second graph, where values for the first bar are like, 10,9

Legend text color in accordance with line color in jqplot

最后都变了- 提交于 2019-12-18 05:24:09
问题 I am using jqplot to draw multiple lines of different line colors. Also, I have legends whose colors should be in accordance with the corresponding line colors. I seem to find no way to cope with the legend color. So any hint? 回答1: Taken from the question title I understand you want to change the color of legend labels to correspond to the color of series, right? For this reason, since the swatches which are just in front of the labels, we can use them to grab the color which we then set for

JqPlot As Image

天大地大妈咪最大 提交于 2019-12-17 23:31:56
问题 In the latest JqPlot examples (see here, there are buttons underneath some charts that you can click, and a div slides down with the chart as an image, allowing you to right click and save as. I've checked the source and I just can't see myself where this is happening. I've seen various discussions about this (see here however my javascript is basic at best. This is however something I would like to implement in my current project. Is anyone aware of a complete tutorial as to how to do this,

display pointlabel in highlighter jqplot

有些话、适合烂在心里 提交于 2019-12-13 15:18:06
问题 I've many series of just two points on a graph to simulate a timeline. These points have a pointlabel. I'd like to have the name of that pointlabel in the highlighter. How do I do that? please see my JsFiddle http://jsfiddle.net/NVbjv/8/ I'd tried to add a highlighter object to each series, and give it a format string. But how can I make this more dynamic? I also like to only display time in the hoverbox-thingy in the bottom right. How do I get remove the ",1 " and ",2"? 回答1: The only idea

How to change Bar color based on threshold values in jqplot?

允我心安 提交于 2019-12-13 14:32:37
问题 Is there a way to set/change the bar color based on a threshold value in a bar chart. var s1 = [460, -260, 690, 820]; For the values specified above, the bar for the one below -200 (bar for -260) should be red. Is there a way to do it in jqplot? Note: I know jqplot changes the bar color for negative values which is something like setting the threshold as 0. But I have a non-zero threshold. Please help! Below is the code that I used for generating the bar chart $(document).ready(function(){

jqplot, remove outside border

安稳与你 提交于 2019-12-13 12:08:32
问题 How to remove outside borders of jqplot, Please take a look at following screenshot. I tried with different options and searched for it, ButI didn't get a solution. Here is my code, plot1 = $.jqplot(container, [data], { title: 'title', animate: true, animateReplot: true, seriesColors:['#00ADEE'], seriesDefaults: { renderer: $.jqplot.BarRenderer, shadow: false }, axesDefaults: { }, highlighter: { tooltipAxes: 'y', show: true, tooltipLocation: 'sw', formatString: '<table class="jqplot

Formatting Y axis numbers in jqPlot

筅森魡賤 提交于 2019-12-13 06:19:53
问题 I managed to format my y axis text to two decimals, but since I'm using very large numbers, is there a way I can display my numbers like: NAD 100,000,000.00 rather than NAD 100000000.00 by using tick options yaxis: { tickOptions:{formatString:'NAD %.2f'} } 回答1: This actually does.... tickOptions:{ formatString:"NAD %'d " } 来源: https://stackoverflow.com/questions/16436132/formatting-y-axis-numbers-in-jqplot

Populate Jqplot from remote JSON

大憨熊 提交于 2019-12-13 05:09:22
问题 I'm trying to populate a bar chart from an external JSON in a PHP file. I've trying to use AJAX and getJSON function to do this but still failed to generate a chart. Here is how my JSON format look like: [ { "NAME": "a chart", "VALUES": "[[439, 233, 233, 495],[292, 360, 262, 173],[222, 95, 27, 27]]" } ] Here is the javascript: $(document).ready(function() { urlDataJSON = 'data.php'; $.getJSON(urlDataJSON, function (data) { console.log(data.output); var dataLabels = ['base', 'key', 'pacing',

JSON from .NEt WCF to JavaScript array of arrays

我的未来我决定 提交于 2019-12-13 03:34:46
问题 I'm using jqPlot and I need to turn this JSON which I receive from a WCF service: [{ "x": 2, "y": 3 }, { "x": 25, "y": 34 }] into this array or arrays: [[2,3],[25,34]] I've tried JSON.parse & eval but to no avail. thanks 回答1: You can use $.map() to do that: var data = [{ "x": 2, "y": 3 }, { "x": 25, "y": 34 }] var flattenedResult = $.map(data, function(point) { return [[ point.x, point.y ]]; }); 回答2: Parse the string into an array of objects: var json = '[{ "x": 2, "y": 3 }, { "x": 25, "y":