Is there a Line of Bar Charting Javascript Library which is free/ Which contains the ability to add a report filter - charts

I've been looking for a javascript library like highcharts or rgraph which contains the ability to add a report filter.
Does anyone know if there is one?

If 'report filtering' = show/hide certain data from the chart. Check this out. i haven't used it myself but looks good: http://code.shutterstock.com/rickshaw/
Also this one looks great too: http://nvd3.org - also powered by the awesome d3.js library

Related

Mapbox Studio: can you change the style after the fact?

Is it possible to change the base style of a custom style after the fact in Mapbox Studio? If yes, how? I looked around the UI and in the documentation but couldn't find how.
Say I created a private style from the Vintage designer style (for example's sake), then added and customized layers by importing tilesets, can I switch to the another base style (e.g. North Star), or do I need to start a new custom style from the start?
Yes. Mapbox Studio is just a GUI for generating Javascript; it outputs a giant JSON file.
(A Mapbox Style is just a JSON object.)
Each of your data layers is included in that JSON (and can be copied and pasted into another style JSON).
Use these instructions to learn the process:
https://mapbox.com/help/transfer-styles-between-accounts
Hope that helps!

Is it possible to create your own drag and drop Mailchimp template?

I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like this, not sure if I'm missing something obvious but I can't find a drag and drop that allows for the different coloured background with columns too.
I could use a block of code but I can't edit the css styles so it wouldn't be responsive for mobile and also not very friendly for those who don't know html.
Rather old question, but to who it might be helpfull:
If you code your own template and upload it to Mailchimp you lose the 'drag & drop' system/UX interface with the different blocks. You are able to create repeatable blocks but then it works with a dropdown list. This is (in my humble opinion) not that user friendly and takes a while before you fully understand how to use the dropdown. I had to explain it to a client earlier today and took a while before they understood it, so I decided to write them a manual for it.
But the design you want to create should be possible to make with a standard MC template. In the 'design' tab you will find settings to control background colors etc.
Still not possible, answer from the Mailchimp support: "At the moment, it's not currently possible to code a drag and drop template completely--one of our drag and drop template layouts will need to be selected, but you can drop in Code blocks to get a little more control over the styling of certain sections."
Though, if it's any help, it is possible to fully custom code your own template, and then add in mailchimps special Template language to the template to open up sections as editable within the campaign builder--or even duplicate certain sections of content. It's not quite the same as the drag drop templates, but adds similar functionality. More info on working with template language can be found here: https://mailchimp.com/help/getting-started-with-mailchimps-template-language/
I know this is an old question, but while searching for this myself I stumbled upon a solution posted here.
Basically it is possible to code your own drag n' drop template, but the solution has not been documented.
Find one of the Mailchimp templates (either one of the basic templates or a custom template from the 'Themes' menu.
Use 'Inspect element' and copy the source code of the iFramed html-email.
Paste in your preferred HTML-editor and modify as intended
Create your own template from the 'Paste in code' mode
If you want custom modules to be added by default, edit using the menu 'Edit design' in the bottom of the screen.
Save and exit :)
I found part of the answer on another topic: [Is it possible to code drag&drop templates for mailchimp?
If you add the following code into your main content div or td it will enable the drag and drop block editor:
mc:container="body_container" mccontainer="body_container"
example:
<div mc:container="body_container" mccontainer="body_container"></div>
This code will add a block editor region to the preheader section:
mc:container="preheader_container" mccontainer="preheader_container"
For the header:
mc:container="header_container" mccontainer="header_container"
For the footer:
mc:container="footer_container" mccontainer="footer_container"
Note: It doesn't seem to matter what you call the mc:container. Creating a new container with a different name worked. Although using just mc:container tag seems to work at first by itself, the mccontainer (no colon) tag is required for it to save properly.
You can create your own drag and drop template you need to add the following into your html coded template where you want the 'drag and drop' feature to exist.
<div id="templateBody" mc:container="container_name" mccontainer="container_name" class="tpl-container">
<div mc:block="3502204" mc:blocktype="text" mcblock="3502204" mcblocktype="text" class="tpl-block"></div>
</div>
This can be repeated in your code multiple times for multiple insertions. I could not find documentation to indicate if the container name or block number needs to be unique, I did make it unique in my template.

JFreeChart charts appearance when combined with JasperReports

I use JFreeChart in my java application to display charts like this one:
But after creating a report with JasperReports that chart now looks like this:
And that's not all, this is how a chart looks like inside the first PDF report generated with the app:
And this is how it looks when I generate a second report, without changing anything, just generating it again:
This happens again and again, everytime I restart the application. Charts are ok until I create a report. What's happening?
It looks like JasperReports is using a more prosaic BarPainter in it's ChartTheme, probably to accommodate destinations that handle gradients poorly.
This forum thread suggests applying the desired theme directly to the chart. The createLegacyTheme() method "returns a ChartTheme that doesn't apply any changes to the JFreeChart defaults. It, or something similar, might be worth a try:
StandardChartTheme.createLegacyTheme().apply(chart)
I've moved the edits here as an answer:
The theme problem
Thanks to #trashgod I've tried the following line:
ChartFactory.setChartTheme(StandardChartTheme.createJFreeTheme());
If I use this line before creating charts in my application, reports no longer affect the appearance of them. I think it is enough to put this line just once after report creation.
So now I just have one problem: the first report is different from subsequent reports: charts are different, fonts are bolder and not antialiased...
The Problem of the second report
The pdf issue is not caused by jasper reports nor jfreechart. It is a problem of Adobe Reader. This happens when you have more than one instance of Adobe Reader running (for example, when you have two different files opened).
An example of the problem:
Similar issues:
http://forums.adobe.com/message/4192938
http://forums.adobe.com/thread/902298

Dynamic controls in PDF Adobe Cycle

Does anyone know how to add control (example: field) on-run in PDF? I'm using Adobe LiveCycle ES2; need that piece of JavaScript....
Thank you all -
I previously tried to do something similar but have never been able to find a method of dynamically creating an object on a form.
You can use the addInstance command to add an instance of a new form and it's possible to add additional rows to a table but other than that, the only method I have found that works is to add the objects from the toolbox and then show/hide them.
It does mean that you're adding additional objects to the form but if used correctly this doesn't really have too much affect on the file size but it does involve extra coding.

Is it possible to control top & bottom page margins when using UIMarkupTextPrintFormatter?

I'm trying to use the printing stuff in iOS 4.2 to print from my iPhone app, but I'm having real trouble getting multi-page content to display nicely. As you can see in the attached screenshots of PDFs generated through the iOS printing API, UIMarkupTextPrintFormatter really likes to use a painfully small top-margin when rendering.
Additionally, it doesn't seem to try to split block-elements too nicely either ... it's tough to see in the screenshot but the page break actually occurs halfway through a table row, rather than on a border between rows.
I've tried using the CSS #page directives to specify page boundaries, however iOS Webkit doesn't seem to support these at all.
Does anyone know of any techniques, either in HTML or through the iOS SDK to make these top-margins bigger?
I really don't want to write a custom UIPrintPageRenderer class because I'm trying to give my users the ability to customize their printouts through HTML templates ... going with a custom renderer would almost certainly make this impossible (or really difficult).
Any help is much appreciated!
You're on the right track with UIPrintPageRenderer, but fortunately you don't need to write a custom subclass to do this. All you need to do is instantiate a vanilla UIPrintPageRenderer, set the headerHeight and footerHeight properties, and add your HTML formatter to the renderer using addPrintFormatter:startingAtPage:. It only takes a few extra lines of code, I have posted my method here: Print paper size and content inset