[
Log In
]
HOME
SAMPLES
DOCS
DOWNLOAD
LICENSING/PRICING
SUPPORT
FORUM
WHAT'S NEW
PRODUCT ROADMAP
ABOUT US
Home
\
Support
\ Forum
Welcome Guest
Search
|
Active Topics
|
ERROR
DataViz Charts and Gauges
»
DataViz Charts Forums
»
DataViz Charts for ASP.NET Web Forms
»
How to get the fillStyle of the current series
How to get the fillStyle of the current series
Options
Previous Topic
Next Topic
jasonysli
#1
Posted :
Wednesday, October 9, 2013 12:32:55 AM(UTC)
Rank: Newbie
Groups: Registered
Joined: 10/9/2013(UTC)
Posts: 3
Thanks: 4 times
Was thanked: 0 time(s) in 0 post(s)
Dears
Hi this plug-in is so awesome ! You Guys so Amazing
And I have a question :
I can get the fillStyle of the series which i clicked.
But i can't get the properties of the current series array.
$(chartName).bind('legendItemMouseDown', function (e, data) {
var fillStyle = data.series[0].fillStyle
;
var series = $(chartName).jqChart('option', 'series');
var firstSeriesFillStyle = series[0].fillStyle; // <- How to get the fillStyle in this case?
}
Back to top
User Profile
View Thanks
Ivan
#2
Posted :
Wednesday, October 9, 2013 6:56:46 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)
In the "$(chartName).bind('legendItemMouseDown', function (e, data)" you can just use:
Code:
var fillStyle = data.series.fillStyle;
Best,
Ivan Petrov
jqChart Inc.
Back to top
1 user thanked Ivan for this useful post.
jasonysli
on 10/13/2013(UTC)
User Profile
View Thanks
jasonysli
#3
Posted :
Sunday, October 13, 2013 9:06:08 PM(UTC)
Rank: Newbie
Groups: Registered
Joined: 10/9/2013(UTC)
Posts: 3
Thanks: 4 times
Was thanked: 0 time(s) in 0 post(s)
Thanks for your reply!
So i can just know the legend name which i clicked but not the fillStyle :o?
i wonder how to keep the rest series fillstyle while i remove the specific series dynamically :)
Back to top
User Profile
View Thanks
Dragan
#4
Posted :
Monday, October 14, 2013 2:00:21 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)
You can set fill styles of each of your series, so you'll keep their colors when add/remove series.
Code:
series: [
{
fillStyle: '#418CF0'
http://www.jqchart.com/jquery/chart/ChartTypes/ColumnChart
Best Regards,
Dragan Matek
jqChart Inc.
Back to top
1 user thanked Dragan for this useful post.
jasonysli
on 10/17/2013(UTC)
User Profile
View Thanks
jasonysli
#5
Posted :
Thursday, October 17, 2013 8:25:09 PM(UTC)
Rank: Newbie
Groups: Registered
Joined: 10/9/2013(UTC)
Posts: 3
Thanks: 4 times
Was thanked: 0 time(s) in 0 post(s)
Thx,Dragon
Because of the series is created dynamically, i don't think the fillStyle can be set on the script (?)
Should i use a Session(DataTable) to store the fillstyle :/ ?
Back to top
User Profile
View Thanks
Dragan
#6
Posted :
Tuesday, October 22, 2013 6:06:51 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)
You can set fillStyle when you add a new series:
Code:
var newSeries = {
type: 'line',
fillStyle : 'red',
data: data
};
series.push(newSeries);
Best Regards,
Dragan Matek
jqChart Inc.
Back to top
1 user thanked Dragan for this useful post.
jasonysli
on 10/23/2013(UTC)
User Profile
View Thanks
Users browsing this topic
Guest
(4)
DataViz Charts and Gauges
»
DataViz Charts Forums
»
DataViz Charts for ASP.NET Web Forms
»
How to get the fillStyle of the current series
Forum Jump
DataViz Charts Forums
- DataViz Charts and Gauges for JavaScript/jQuery
- DataViz Charts and Gauges for ASP.NET MVC
- DataViz Charts for ASP.NET Web Forms
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.
Watch this topic
Email this topic
Print this topic
RSS Feed
Normal
Threaded
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.106 seconds.