Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is it posible to use negative numbers? #166

Open
Frits1969 opened this issue Jun 24, 2018 · 4 comments
Open

How is it posible to use negative numbers? #166

Frits1969 opened this issue Jun 24, 2018 · 4 comments

Comments

@Frits1969
Copy link

Frits1969 commented Jun 24, 2018

Hello,

I use a negative number. Then I don't get a line. But wen I don't, everything will be ok.
How is it posible to use negative numbers?
This is my code and thanks for help already.
`$(document).ready(function () {
$.jqplot._noToImageButton = true;
$.jqplot.config.enablePlugins = true;

var line1 = [["2018-05-02","15.00"],["2018-05-03","280.00"],["2018-05-05","-60.00"]] ; ?>; 
									 
var plot1 = $.jqplot("chart1", [line1], {
	seriesColors: ["rgba(207, 129, 51, 0.7)"],
	highlighter: {
		show: true,
		sizeAdjust: 1,
		tooltipOffset: 9
	},
	grid: {
		background: 'rgba(57,57,57,0.0)',
		drawBorder: false,
		shadow: false,
		gridLineColor: '#666666',
		gridLineWidth: 1
	},
	legend: {
		show: true,
		placement: 'outside'
	},
	seriesDefaults: {
		rendererOptions: {
			smooth: false,
			animation: {
				show: false
			}
		},
		showMarker: false
	},
	series: [
		{
			fill: false,
			label: 'totaal'
		}
	],
	axesDefaults: {
		rendererOptions: {
			baselineWidth: 1.5,
			baselineColor: '#444444',
			drawBaseline: false
		}
	},
	axes: {
		xaxis: {
			renderer: $.jqplot.DateAxisRenderer,
			tickRenderer: $.jqplot.CanvasAxisTickRenderer,
			tickOptions: {
				formatString: "%b %e",
				angle: -30,
				textColor: '#dddddd'
			},
			min: "<?php echo $datum1; ?>",
			max: "<?php echo $datum2; ?>",
			tickInterval: "1 days",
			drawMajorGridlines: false
		},
		yaxis: {
			renderer: $.jqplot.LogAxisRenderer,
			pad: 0,
			rendererOptions: {
				minorTicks: 1
			},
			tickOptions: {
				formatString: "€ %.2f",
				showMark: false,
				textColor: '#000000'
			}
		}
	}
});

  $('.jqplot-highlighter-tooltip').addClass('ui-corner-all')

});
`

@dg-hub
Copy link
Contributor

dg-hub commented Oct 14, 2018

Hi @Frits1969

The code produces the following output, can you explain in more detail what you are not seeing or expecting to see.

download

Your code includes <php> elements, have your confirmed the following is not a server side issue (in php)?

Thanks

@Frits1969
Copy link
Author

Frits1969 commented Oct 21, 2018

@dg-hub , thanks for you reaction.

My line is a sum of all the numbers before.
When all the total values are positive, I get a good line.
When one total value is 0, then I don't get this point.
When one total value is negative, I don't get any line.

I use php 5.6.36
I use jqplot.1.0.9.d96a669

@johanbove
Copy link
Member

Actually, @dg-hub replied. I only added some labels. :-)
Thank you for posting this issue and being active in this project.

@Frits1969
Copy link
Author

Thanks @johanbove , I'v correct it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants