Welcome Guest Search | Active Topics |

Hiding the axes
chuck
#1 Posted : Monday, November 19, 2012 1:42:09 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/19/2012(UTC)
Posts: 7

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
The number one problem I am having trying to learn jqChart is the lack of professional quality documentation on options.

So I have to ask, is there a way to have my graph w/o a visible Y axis? Not only does it seem inelegant to specify my background color as the "strokestyle", it also doesn't quite work as there are artifacts drawn where each tick label is being rendered:

axes: [
{
name: 'y1',
labels: {
strokeStyle: '#FFFFFF',
},
majorGridLines: { strokeStyle: '#FFFFFF' },
majorTickMarks: { strokeStyle: '#FFFFFF' }
},
],

regards,
Chuck
chuck
#2 Posted : Monday, November 19, 2012 2:09:57 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/19/2012(UTC)
Posts: 7

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Forgot to mention, I read through the minimized code to, and got the idea to try "visible" option. It has an impact on major and minor ticks, and the tick labels (so no more artifacts), but still doesn't get rid of the veritcal Y axis line:

axes: [
{
name: 'y1',
visible: false,
strokeStyle: '#FFFFFF',
labels: {
visible: false,
strokeStyle: '#FFFFFF',
},
majorGridLines: { visible: false },
majorTickMarks: { visible: false }
},
Ivan
#3 Posted : Monday, November 19, 2012 2:18:40 PM(UTC)
Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 11/5/2012(UTC)
Posts: 131

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

Unfortunately our documentation is uncompleted, so please ask us about any issues you have.

You need to specify the location and type options of your axis. In your case your code should look like:

Code:
axes: [
{
location : 'left',
type : 'linear',
name: 'y1',
visible: false,
strokeStyle: '#FFFFFF',
labels: {
visible: false,
strokeStyle: '#FFFFFF',
},
majorGridLines: { visible: false },
majorTickMarks: { visible: false }
},


You can hide the y-axis with:

Code:
axes: [ {
type: 'linear',
location: 'left',
labels: { visible: false },
majorTickMarks: { visible: false },
majorGridLines: { visible: false },

},
Best,
Ivan Petrov
jqChart Inc.
chuck
#4 Posted : Monday, November 19, 2012 3:13:48 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/19/2012(UTC)
Posts: 7

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

No, that does not make all of the axis invisible. The vertical line on the left edge of the graph is still shown. Putting exactly what you posted as the axes definition in your jqChartJQueryPlugin_3_5_1_0\samples\MultipleAxes.htm example I still get a black vertical line on the left edge of the plot.

axes: [
{
name: 'y1',
location: 'left',
labels: { visible: false },
majorTickMarks: { visible: false },
majorGridLines: { visible: false },
},

It only goes away when I add
strokeStyle: '#FFFFFF',

where white happens to be the background color of the page the graph is rendered on -- something I can't always know in advance.

cheers,
Chuck

Ivan
#5 Posted : Tuesday, November 20, 2012 8:04:11 AM(UTC)
Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 11/5/2012(UTC)
Posts: 131

Thanks: 0 times
Was thanked: 15 time(s) in 15 post(s)
You can also use:

Code:
strokeStyle: 'transparent'

or
Code:
lineWidth : 0


I'm suggesting the second one.
Best,
Ivan Petrov
jqChart Inc.
Users browsing this topic
Guest (3)
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.086 seconds.