FLOT use legend to toggle series - flot

This has been marked as answered and duplicated when asked again, but the solution provided in that "answer" does not actually use the legend to toggle the series, it uses a different set of check boxes to do the toggling, NOT THE LEGEND. I wish people here would actually read questions and look at the answers provided or accepted before deciding they are already answered or duplicates.
The answer accepted here does not use the legend to toggle the series:
Toggle data series by clicking legend in flot chart?
Therefore, the actual question has not been answered, the user just opted for a different solution. So I'll ask again, does someone know of a way to toggle data series using the legend. Before anyone asks for my code, I have tried this about 20 different ways without success, there's no point in posting it. I just need a simple example with more than one data set that actually works. If you really need me to provide a basic flot chart with 3 or 4 data sets I can.

Related

Can I make a timeline bar graph with two types of data in Excel?

I used the search function and could not find an answer for this.
I have data that looks like the following:
I would like one bar graph with the date on the x-axis and "Inches" on the y-axis, but I would like the color of the bar to change depending on the 'Type' of Y data. When I try to use the charts under the "insert" tab, this does not work. It makes one huge plot with all of the information crammed into the x-axis. I am fairly new to this sort of thing, however, and could be doing things wrong.
Any advice would be hugely appreciated. Please let me know if there is any information that I can add to make this question more helpful. Thanks in advance.
Edit: I am new to asking questions like this, if anything is done incorrectly, please let me know and I will try to fix it. Thanks so much for your patience.
If you organize your data into three columns: Date, Irrigation, and Precipitation.
Then from the Insert ribbon, select a 2D chart. The default chart settings produces a chart like this:

Color Excel Rows By Outline Level [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm using the outline function in Excel to create an indented bill of materials (BOM) and I'd like to automatically color the rows by their outline level. A BOM is a list of parts in a product. For each sub assy in the BOM, it is typically indented to show the product structure and the Excel outline function works well for this.
What I'd like is for each level of the outline to be colored differently to aid in visualizing the BOM. I can't figure out how to capture the outline level in order to apply conditional formatting to make that happen.
Frankly, I'm after just what is described in this question, except my outline is by row instead of by column. I have not been successful in getting the solution offered there to work and haven't found another solution here or elsewhere online. I think there are assumptions made there that I don't understand or I'm not implementing the custom function properly. I'm not permitted to comment on that solution for clarification, which is why I posted a new question.
Can anyone help me get that solution to work or offer an alternative?
Thank you.
I found a partial answer. It's not quite what I want, but it's an improvement.
This section of the Office Support article on outlines describes how to apply styles to an outline. I had tried it, but the built in styles only change levels one and two and then only apply bold and italics. I simply didn't see the changes. By modifying the built in styles, they became more distinct.
That said, it only applies those styles to the lead line at each level, not to every item at each level:
Auto Styles
So, while it does help, it's not exactly what I want. I'd really like every line to have formatting corresponding to its level in the outline. As you can see in the image above, it's not easy to see where an outline level stops using this auto formatting.
This is a better solution, but I'll leave the other because it may help someone else.
Post #4 in this thread at Mr. Excel describes how to report the outline level in a cell. It's old, so the menu picks are different. You get to the Define name dialog by selecting the cell, right mouse and pick Define Name from the pop up menu.
Now that I have the outline level in a cell, I was able to use regular conditional formatting rules to format the worksheet:
Fully Colored
This does require you to save it as a macro enabled workbook.

How to get visible start and end dates in AnyGantt?

How can I get the visible date interval in AnyGantt? I need to add two buttons to move back and forth the gantt, but I can't find how to do it. I was thinking on reading current start and end dates and then zooming the gantt to the new values...
Thanks.
I'm glad to inform you that new version of AnyGantt 8.1.0 provides new methods to get max and min of visible range.
You may learn more about them and find example on the following page
Mendi,
In this case zooming the gantt to the new values is one of available ways to do it.
Check this example which demonstrates using html buttons and zoomTo() method to scroll timeline :
https://jsfiddle.net/Shestac92/9zzhw472/3/
chart.zoomTo(start, end);
Also you may use out-of-the-box method to add similar buttons to horizontal scroll bar, check example in Anychart Playground:
https://playground.anychart.com/api/7.14.3/core/ui/anychart.core.ui.ScrollBar.buttonsVisible-plain
scrollBar.buttonsVisible(true);
Hope this will help you!

TableWrapData: widgets won't left align properly

My program uses TableWrapLayout with numColumns set to 2. I then have the following code: (background colors are set to show you that the widgets aren't using the blank space).
Label label = toolkit.createLabel(container, "Resource Type":);
label.setLayoutData(new TableWrapData(TableWrapData.LEFT,TableWrapData.MIDDLE));
label.setBackground(DiagramSettings.NODE_BACKGROUND_COLOR);
resourceComboMenu = new Combo(container, SWT.READ_ONLY);
resourceComboMenu.setBackground(DiagramSettings.NODE_BACKGROUND_COLOR);
resourceComboMenu.setLayoutData(new TableWrapData(TableWrapData.LEFT,TableWrapData.MIDDLE));
However as you can see in the picture the combo box refuses to left align properly. But that I mean I want it to start right after the label, not have a bunch of blank space.
One workaround would be to put the row inside it's own Composite just like I do Resource Icon and Geolocation. But I feel like I shouldn't need to since the widgets on this row equals the number of columns set by the layout. I've created this workaround for now but would like to understand this TableWrapData behavior for the future.
Any insight would be helpful, thanks.
I pretty much answered my question in the question. The composite that contains everything in the picture had TableWrapData with columns set to 2. TableWrapData essentially draws a straight, vertical line between each column then makes sure widgets from one column don't cross it.
So to fix this (like I mentioned in my question) you simply make another composite with nested widgets (which in the case would be the resource type label and resourceComboMenu). I just didn't realize that is what you're supposed to do.

Integrating charts in Excel

I was wondering if there is a way to integrate a bar chart and a line chart into "one single chart", where the bars are "on top of the line plot? See picture for a clearer view.
(Obviously the bar-chart is not supposed to be outside the actual plot...)
This is a bit of a hack, but you could create two charts with the chart area fill transparency turned to 100%. This allows charts to be placed on top of each other, but in a way that both can be seen. Turning off any elements in the chart that you don't want (for example, duplicate axis) would enhance the presentation.
Problem solved. It was actually just a matter of scaling data, and using two "line with markers" type charts. The lines in between each dot in the one showing the percentage, were then removed. Then, using a certain layout, a line connecting the two series could appear (as shown in pic).

Resources