Welcome Guest Search | Active Topics |

duplicate axis
vbanker@enghouse.com
#1 Posted : Sunday, January 25, 2015 9:51:52 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 11/20/2014(UTC)
Posts: 7

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
Hi!
The line type jqchart duplicate bottom axis labels from 0-24 and below 1 - 7:
$('#chart_jqChartLineCH').jqChart({

axes: [{
type: 'linear',
location: 'bottom',
minimum: 0,
maximum: 23,
interval: 1,
title: {
text: 'Hours',
fillStyle: 'green'
},
zoomEnabled: false,

},
{
type: 'linear',
location: 'left',
minimum: 0,
maximum: 3000,
interval: 100,
}]

,
title: { text: 'Hourly Total Handled By Queue ' },
series: [
{
type: 'line',
title: 'Series 1',
data: [[1, 62], [2, 60], [3, 68], [4, 58], [5, 52], [6, 60], [7, 48]]
},
{
type: 'line',
title: 'Series 2',
data: [[1, 46], [2, 40], [3, 62], [4, 65], [5, 60], [6, 36], [7, 70]]
}
]

});
Dragan
#2 Posted : Monday, January 26, 2015 10:08:46 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

we are testing your code with jqChart version 3.8.7.0 and there is only one bottom axis with range 0-24. Which version are you using?
Best Regards,
Dragan Matek
jqChart Inc.
vbanker@enghouse.com
#3 Posted : Monday, January 26, 2015 10:20:17 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 11/20/2014(UTC)
Posts: 7

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
I found the issue: I created data using javascript :
var evalexpr = "newSeries.data.push([item.XValuesField , item.YValuesField]);"
then it was created wrong 2 lines of bottom axis....

Once I added parseInt to X element it solved the issue:

var evalexpr = "newSeries.data.push([parseInt(item.XValuesField) , item.YValuesField]);"
eval(evalexpr);

Question - do you have default parameters for series, so I can assign series type(int) on beginning - because I delete and add all new series by ajax.
For example seriesDefaults from below http://www.jqplot.com/do...s/jqPlotOptions-txt.html
Dragan
#4 Posted : Wednesday, January 28, 2015 7:49:28 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Currently this is supported if you use data source:
http://www.jqchart.com/jquery/chart/ChartData/BindingDataSource

Code:
xValuesField: {
   name: 'date',
   type: 'dateTime' // string, numeric, dateTime
}

Best Regards,
Dragan Matek
jqChart Inc.
vbanker@enghouse.com
#5 Posted : Wednesday, January 28, 2015 7:56:34 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 11/20/2014(UTC)
Posts: 7

Thanks: 2 times
Was thanked: 0 time(s) in 0 post(s)
we are not using data source.... could it be added to next release?
thanks
Dragan
#6 Posted : Wednesday, January 28, 2015 8:28:19 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
We'll try adding it. In the meantime you can simply check if the x value is string or float. If it is string, just parse it.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.129 seconds.