Welcome Guest Search | Active Topics |

JQChart for MVC - Spine Chart
Nilan
#1 Posted : Tuesday, March 27, 2012 1:51:57 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/27/2012(UTC)
Posts: 1

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

We are using the JQChart for MVC - Spline Chart.

There's a requirement for the x-axis of the spline chart to be

[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]

I can do that easy enough with the X-Axis settings.

However, the issue I am having is that the data-points, do not line up with the X-Axis Settings.
So the data points maybe:

ChartPoint( 5, 30 );
ChartPoint( 15,45);

This is then causing issues with the x-axis labels...

Is there a way to do this?

Thanks

Nilan
Dragan
#2 Posted : Wednesday, March 28, 2012 7:44:16 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 Nilan,

I’m not really sure I understand your issue.

You can specify these axis settings with:

Code:
<%= Html.JQChart().Chart()
                .ID("jqChart")
                .Width("500px")
                .Height("300px")
                .Axes(axis =>
                    {
                        axis.LinearAxis(Location.Bottom)
                            .Minimum(0)
                            .Maximum(100)
                            .Interval(10);
                    }
                )
                .Series(series =>
                {
                    series.Spline()
                          .XValues(new double[] { 20, 30, 60 })
                          .YValues(new double[] { 50, 40, 60 });
                })
                .Render()%>


Quote:
However, the issue I am having is that the data-points, do not line up with the X-Axis Settings.


Can you provide me a little more info about this? You want every data point to have label on the x-axis?

In this case you can change the interval to 5.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest
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.077 seconds.